This commit is contained in:
Krivchikov Dmitry 2016-04-08 16:57:30 +03:00
parent 26f9cc8752
commit f291c4d2b4
1 changed files with 1 additions and 1 deletions

View File

@ -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'];