diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index 3c479d3b..ab2a1e7c 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -105,7 +105,7 @@ class RankingController extends BaseAuthedController { ) ); if ($row['row_count'] > 0) { - $count = ceil($row['row_count'] / 10.0); + $count = ceil($row['row_count'] / 2); $rows = myself()->_getSelfMysql()->execQuery( 'SELECT * FROM t_rank_activity ' . 'WHERE type=:type AND channel=:channel AND value>=:value ' . @@ -135,6 +135,21 @@ class RankingController extends BaseAuthedController { } } } + { + $row = myself()->_getSelfMysql()->execQueryOne( + 'SELECT * FROM t_rank_activity ' . + 'WHERE type=:type AND channel=:channel AND account_id=:account_id;', + array( + ':type' => $type, + ':channel' => $channel, + ':account_id' => myself()->_getAccountId(), + ) + ); + if ($row) { + $myRanked['value'] = $row['value']; + $myRanked['modifytime'] = $row['modifytime']; + } + } } $timeZone = 8; $rankingData = array( diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 8e199650..d005bffa 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -371,12 +371,16 @@ class UserController extends BaseAuthedController { public function query() { $name = getReqVal('name', ''); + $filter = array( + 'name' => $name, + ); + if (SERVER_ENV == _ONLINE) { + $filter['channel'] = BC_CHANNEL; + } $userDb = SqlHelper::ormSelectOne ($this->_getMysql($name), 't_user', - array( - 'name' => $name - ) + $filter ); if (!$userDb) { $this->_rspErr(1, 'not found'); diff --git a/webapp/services/RankActivityService.php b/webapp/services/RankActivityService.php index 770dfe0f..dfcfe77f 100644 --- a/webapp/services/RankActivityService.php +++ b/webapp/services/RankActivityService.php @@ -42,7 +42,7 @@ class RankActivityService extends BaseService { { $this->internalUpdateRankActivity( self::ALIVE_TYPE, - getReqVal('alive_time', 0), + getReqVal('alive_time', 0) / 1000, self::OP_SUM); $this->internalUpdateRankActivity( self::KILLS_TYPE,