X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsearch.php;h=bd7a7b35d0697f9fc8d9a3c068c81e11fc50219e;hb=c2086ec50ed339fb864c8f0a93fbc40ff530c666;hp=c0e6809ec019772c4b73d5b3ce76d6459c72f4e8;hpb=57fe19da72be37104915676b8003326d8e440343;p=friendica.git diff --git a/mod/search.php b/mod/search.php index c0e6809ec0..bd7a7b35d0 100644 --- a/mod/search.php +++ b/mod/search.php @@ -27,10 +27,11 @@ function search_content(&$a) { $r = q("SELECT COUNT(*) AS `total` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 - AND `wall` = 1 + AND ( `wall` = 1 OR `contact`.`uid` = %d ) AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND MATCH (`item`.`body`) AGAINST ( '%s' IN BOOLEAN MODE ) $sql_extra ", + intval(local_user()), dbesc($search) ); @@ -50,11 +51,12 @@ function search_content(&$a) { FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 - AND `wall` = 1 + AND ( `wall` = 1 OR `contact`.`uid` = %d ) AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND MATCH (`item`.`body`) AGAINST ( '%s' IN BOOLEAN MODE ) $sql_extra ORDER BY `parent` DESC ", + intval(local_user()), dbesc($search) );