From f291c4d2b4651d0c1e4fc9014e6d7bf1083963e7 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Fri, 8 Apr 2016 16:57:30 +0300 Subject: [PATCH] FIX --- controllers/FeedController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/FeedController.php b/controllers/FeedController.php index 9de2993..1206ff8 100644 --- a/controllers/FeedController.php +++ b/controllers/FeedController.php @@ -55,7 +55,7 @@ class FeedController extends Controller // --------- AUTHORS $authors = array(); - $authorIds = App::DB()->query('SELECT `author` , COUNT( * ) `cnt` FROM `points` WHERE `moderate`=1 GROUP BY `author` ORDER BY `cnt` DESC LIMIT 0 , 6')->fetchAll(PDO::FETCH_ASSOC); + $authorIds = App::DB()->query('SELECT `author` , COUNT( * ) `cnt` FROM `points` WHERE `status`="published" GROUP BY `author` ORDER BY `cnt` DESC LIMIT 0 , 6')->fetchAll(PDO::FETCH_ASSOC); foreach ($authorIds as $authorId) { $author = User::model()->getByPK($authorId['author']); $author->pointsCount = $authorId['cnt'];