diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index e70af74b..3c479d3b 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -84,6 +84,7 @@ class RankingController extends BaseAuthedController { private function internalGetActivityRankData($type) { + $channel = 6516; $userInfo = $this->_getOrmUserInfo(); $myRanked = array( 'ranked' => -1, @@ -96,21 +97,23 @@ class RankingController extends BaseAuthedController { if ($meta && mt\RankActivity::isActivityPeriod($meta)) { $row = myself()->_getSelfMysql()->execQueryOne( 'SELECT COUNT(*) AS row_count FROM t_rank_activity ' . - 'WHERE type=:type AND value>:value;', + 'WHERE type=:type AND channel=:channel AND value>:value;', array( ':type' => $type, - ':value' => $meta['cond'] + ':channel' => $channel, + ':value' => $meta['cond'], ) ); if ($row['row_count'] > 0) { $count = ceil($row['row_count'] / 10.0); $rows = myself()->_getSelfMysql()->execQuery( 'SELECT * FROM t_rank_activity ' . - 'WHERE type=:type AND value>=:value ' . + 'WHERE type=:type AND channel=:channel AND value>=:value ' . 'ORDER BY value DESC, modifytime ASC ' . "LIMIT ${count}", array( ':type' => $type, + ':channel' => $channel, ':value' => $meta['cond'] ) );