From 476b86e1a21754e4236319fcdcc758edf9f9cd76 Mon Sep 17 00:00:00 2001 From: Michael Johnston Date: Sat, 14 Jul 2012 00:46:41 -0400 Subject: [PATCH] fix pagination on community page --- mod/community.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/community.php b/mod/community.php index fb28f78059..becb5642b1 100644 --- a/mod/community.php +++ b/mod/community.php @@ -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))