1
This commit is contained in:
parent
f158abb365
commit
1fe6d5ec6e
@ -186,13 +186,24 @@ class OtherController extends BaseAuthedController {
|
||||
{
|
||||
$modeList = array();
|
||||
$taskStatus = GlobalData::getServerTaskStatus();
|
||||
mt\MapMode::traverseMeta(function($modeMeta) use(&$modeList){
|
||||
array_push(
|
||||
$modeList,
|
||||
array(
|
||||
'id' => $modeMeta['id']
|
||||
)
|
||||
);
|
||||
$taskMeta = mt\ServerTaskTime::getCurrentTime();
|
||||
mt\MapMode::traverseMeta(function($modeMeta) use(&$modeList, &$taskMeta, $taskStatus){
|
||||
if ($modeMeta['is_open']) {
|
||||
if ($modeMeta['limit_time']) {
|
||||
if (empty($taskStatus)) {
|
||||
return true;
|
||||
}
|
||||
if (myself()->_getNowTime() <= strtotime($taskMeta['obtain_end_time'])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
array_push(
|
||||
$modeList,
|
||||
array(
|
||||
'id' => $modeMeta['id']
|
||||
)
|
||||
);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
$this->_rspData(array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user