* @link http://elgg.org/
*/
-// Search supports RSS
+// Search supports RSS
global $autofeed;
$autofeed = true;
$entity_type = get_input('entity_type', ELGG_ENTITIES_ANY_VALUE);
$entity_subtype = get_input('entity_subtype', ELGG_ENTITIES_ANY_VALUE);
$owner_guid = get_input('owner_guid', ELGG_ENTITIES_ANY_VALUE);
+$container_guid = get_input('container_guid', ELGG_ENTITIES_ANY_VALUE);
$friends = get_input('friends', ELGG_ENTITIES_ANY_VALUE);
$sort = get_input('sort');
switch ($sort) {
'subtype' => $entity_subtype,
// 'tag_type' => $tag_type,
'owner_guid' => $owner_guid,
+ 'container_guid' => $container_guid,
// 'friends' => $friends
'pagination' => ($search_type == 'all') ? FALSE : TRUE
);
// available on metastrings (and boolean mode doesn't need it)
$search_where = search_get_where_sql('msv', $fields, $params, FALSE);
+ $container_and = '';
+ if ($params['container_guid'] && $params['container_guid'] !== ELGG_ENTITIES_ANY_VALUE) {
+ $container_and = 'AND e.container_guid = ' . sanitise_string($params['container_guid']);
+ }
+
$e_access = get_access_sql_suffix('e');
$a_access = get_access_sql_suffix('a');
// @todo this can probably be done through the api..
AND ($search_where)
AND $e_access
AND $a_access
+ $container_and
LIMIT {$params['offset']}, {$params['limit']}
";
AND ($search_where)
AND $e_access
AND $a_access
+ $container_and
";
$result = get_data($q);