Merge pull request #394 from unary/community-pagination
fix pagination on community page
This commit is contained in:
commit
7fc1bae515
1 changed files with 2 additions and 2 deletions
|
@ -45,13 +45,13 @@ function community_content(&$a, $update = 0) {
|
|||
// OR your own posts if you are a logged in member
|
||||
|
||||
|
||||
$r = q("SELECT distinct(`item`.`uri`) AS `total`
|
||||
$r = q("SELECT COUNT(distinct(`item`.`uri`)) AS `total`
|
||||
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 `item`.`moderated` = 0
|
||||
AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
|
||||
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
|
||||
AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `user`.`hidewall` = 0
|
||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 group by `item`.`uri` "
|
||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0"
|
||||
);
|
||||
|
||||
if(count($r))
|
||||
|
|
Loading…
Reference in a new issue