From 89fc319c900873be58fa677707518646f6c79eec Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 10 Oct 2013 21:31:40 -0700 Subject: fix search to display more than one item --- mod/search.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/search.php b/mod/search.php index 9930db288..539241268 100644 --- a/mod/search.php +++ b/mod/search.php @@ -192,7 +192,7 @@ function search_content(&$a,$update = 0, $load = false) { $r = null; if(local_user()) { - $r = q("SELECT distinct mid, item.* from item + $r = q("SELECT distinct mid, item.id as item_id, item.* from item WHERE item_restrict = 0 AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND item_private = 0 ) OR ( `item`.`uid` = %d )) @@ -204,7 +204,7 @@ function search_content(&$a,$update = 0, $load = false) { ); } if($r === null) { - $r = q("SELECT distinct mid, item.* from item + $r = q("SELECT distinct mid, item.id as item_id, item.* from item WHERE item_restrict = 0 AND ((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND item_private = 0 ) @@ -238,7 +238,7 @@ function search_content(&$a,$update = 0, $load = false) { $items = array(); } - +//logger('mod_search: items ' . count($items)); // $r = q("SELECT distinct(`item`.`mid`), `item`.*, `item`.`id` AS `item_id`, // `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`, -- cgit v1.2.3