diff --git a/app.php b/app.php index 1f3446a..2f3e7b2 100644 --- a/app.php +++ b/app.php @@ -93,6 +93,9 @@ class App } } + /** + * @return null|PDO + */ public static function DB() { if (self::$DB === NULL && self::getConfig('DB')) { diff --git a/classes/Helper.php b/classes/Helper.php index 0bffc85..c8cb93e 100644 --- a/classes/Helper.php +++ b/classes/Helper.php @@ -10,9 +10,9 @@ class Helper /** * TYPES: 'clear','html', 'editor','js' - * @param type $string - * @param type $replaceType - * @return type + * @param string $string + * @param string $replaceType + * @return string */ public static function replaceLinks($string, $replaceType = 'clear') { diff --git a/controllers/FeedController.php b/controllers/FeedController.php index ef5ecd8..9de2993 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` 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 `moderate`=1 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'];