From 33347004a55906b1b3ea1ef80850c5bf1a9a3a9e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Dec 2023 15:28:25 +0800 Subject: [PATCH] 1 --- webapp/controller/MatchController.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/webapp/controller/MatchController.class.php b/webapp/controller/MatchController.class.php index 6be37b1f..b2f0ddae 100644 --- a/webapp/controller/MatchController.class.php +++ b/webapp/controller/MatchController.class.php @@ -33,13 +33,15 @@ class MatchController extends BaseAuthedController { return; } $matchInfo = array( - + 'state' => 0, + 'team_list' => array() ); $matchOkDb = $this->readMatchOk($r, $teamUuid); if ($matchOkDb) { $this->refreshKeyExpire($r, MATCH_OK_KEY . $teamUuid, 1000*600); $this->refreshKeyExpire($r, MATCH_OK_KEY . $matchOkDb['target_team'], 1000*600); $this->refreshKeyExpire($r, TEAMID_KEY . $matchOkDb['target_team'], 1000*600); + $this->fillMatchInfo($r, $matchInfo); } else { $currMatchDb = $this->readCurrMatchTeam($r); if (empty($currMatchDb)) { @@ -52,6 +54,7 @@ class MatchController extends BaseAuthedController { } else { if ($currMatchDb['current_team'] != $teamUuid) { $this->matchOk($r, $teamUuid, $currMatchDb); + $this->fillMatchInfo($r, $matchInfo); } } } @@ -140,4 +143,9 @@ class MatchController extends BaseAuthedController { } } + private function fillMatchInfo($r, &$matchInfo) + { + $matchInfo['state'] = 1; + } + }