diff options
author | Friendika <info@friendika.com> | 2010-11-08 21:10:53 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2010-11-08 21:10:53 -0800 |
commit | 9f606be54093b934081eb32f6d1a66f4d9fa9268 (patch) | |
tree | 7f85554ca707709c3cb71bc0f0b695274ed7fac8 /mod | |
parent | 1f4048067e04580f36e22e49909ae6d4b89bf129 (diff) | |
download | volse-hubzilla-9f606be54093b934081eb32f6d1a66f4d9fa9268.tar.gz volse-hubzilla-9f606be54093b934081eb32f6d1a66f4d9fa9268.tar.bz2 volse-hubzilla-9f606be54093b934081eb32f6d1a66f4d9fa9268.zip |
loosen search restrictions
Diffstat (limited to 'mod')
-rw-r--r-- | mod/search.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mod/search.php b/mod/search.php index c0e6809ec..bd7a7b35d 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) ); |