FIX
This commit is contained in:
parent
26f9cc8752
commit
f291c4d2b4
|
|
@ -55,7 +55,7 @@ class FeedController extends Controller
|
||||||
|
|
||||||
// --------- AUTHORS
|
// --------- AUTHORS
|
||||||
$authors = array();
|
$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) {
|
foreach ($authorIds as $authorId) {
|
||||||
$author = User::model()->getByPK($authorId['author']);
|
$author = User::model()->getByPK($authorId['author']);
|
||||||
$author->pointsCount = $authorId['cnt'];
|
$author->pointsCount = $authorId['cnt'];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue