1
This commit is contained in:
parent
b9c133041d
commit
273e7ce611
@ -101,7 +101,7 @@ class RankingController extends BaseAuthedController {
|
||||
);
|
||||
$rankingList = array();
|
||||
$meta = mt\RankActivity::get($type);
|
||||
if ($meta && mt\RankActivity::isActivityPeriod($meta)) {
|
||||
if ($meta) {
|
||||
$row = myself()->_getSelfMysql()->execQueryOne(
|
||||
'SELECT COUNT(*) AS row_count FROM t_rank_activity ' .
|
||||
'WHERE type=:type AND channel=:channel AND value>:value;',
|
||||
@ -125,6 +125,22 @@ class RankingController extends BaseAuthedController {
|
||||
)
|
||||
);
|
||||
$ranked = 1;
|
||||
foreach ($rows as $row) {
|
||||
$user = User::find($row['account_id']);
|
||||
if ($user) {
|
||||
if ($user['account_id'] == $myRanked['user']['account_id']) {
|
||||
$myRanked['ranked'] = $ranked;
|
||||
$myRanked['value'] = $row['value'];
|
||||
$myRanked['modifytime'] = $row['modifytime'];
|
||||
}
|
||||
array_push($rankingList, array(
|
||||
'ranked' => $ranked++,
|
||||
'user' => User::toSimple($user),
|
||||
'value' => $row['value'],
|
||||
'modifytime' => $row['modifytime'],
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user