From 08be834d14ee0e9580c0b24dff10ecccf1c1351d Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Mon, 22 Apr 2024 16:30:29 +0800 Subject: [PATCH] 1 --- webapp/controller/OtherController.class.php | 28 +++++---------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/webapp/controller/OtherController.class.php b/webapp/controller/OtherController.class.php index 9156cbd1..cde447e4 100644 --- a/webapp/controller/OtherController.class.php +++ b/webapp/controller/OtherController.class.php @@ -190,28 +190,12 @@ class OtherController extends BaseAuthedController { $rankSeasonMeta = mt\RankSeason::getCurrentSeason(); mt\MapMode::traverseMeta(function($modeMeta) use(&$modeList, &$taskMeta, $taskStatus,$rankSeasonMeta){ if ($modeMeta['is_open']) { -// if ($modeMeta['limit_time']) { -// if (empty($taskStatus)) { -// return true; -// } -// if (!$taskMeta) { -// return true; -// } -// if (myself()->_getNowTime() <= strtotime($taskMeta['income_start_time'])) { -// return true; -// } -// } - switch ($modeMeta['limit_time']){ - case 1 : { - if (!$rankSeasonMeta){ - return true; - } - } - case 2 : { - if (empty($taskStatus) || !$taskMeta || myself()->_getNowTime() <= strtotime($taskMeta['income_start_time'])) { - return true; - } - } + + if ($modeMeta['limit_time'] == 1 && !$rankSeasonMeta) { + return true; + } + if ($modeMeta['limit_time'] == 2 && (empty($taskStatus) || !$taskMeta || myself()->_getNowTime() <= strtotime($taskMeta['income_start_time']))){ + return true; } array_push(