Suppress content from hidden or blocked contacts

This commit is contained in:
Michael 2018-02-10 12:34:10 +00:00
commit ee7c587693
5 changed files with 8 additions and 7 deletions

View file

@ -194,7 +194,8 @@ function community_getitems($start, $itemspage, $content)
} elseif ($content == 'global') {
$r = dba::p("SELECT `uri` FROM `thread`
INNER JOIN `item` ON `item`.`id` = `thread`.`iid`
WHERE `thread`.`uid` = 0
INNER JOIN `contact` AS `author` ON `author`.`id`=`item`.`author-id`
WHERE `thread`.`uid` = 0 AND NOT `author`.`hidden` AND NOT `author`.`blocked`
ORDER BY `thread`.`commented` DESC LIMIT " . intval($start) . ", " . intval($itemspage));
return dba::inArray($r);
}