Closed jimmydorry closed 8 years ago
https://github.com/GetDotaStats/site/blob/master/site_files/s2/api/s2_phase_3.php#L103-L126
Change to:
if(isset($preGameAuthPayloadJSON['gameFinished']) && $preGameAuthPayloadJSON['gameFinished'] == 0){ $gameFinished = 0; $matchPhaseSet = 2; } else { $gameFinished = 1; $matchPhaseSet = 3; } $gameDuration = !empty($preGameAuthPayloadJSON['gameDuration']) && is_numeric($preGameAuthPayloadJSON['gameDuration']) ? $preGameAuthPayloadJSON['gameDuration'] : NULL; $sqlResult = $db->q( 'INSERT INTO `s2_match`(`matchID`, `matchPhaseID`, `matchDuration`, `matchFinished`) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE `matchPhaseID` = VALUES(`matchPhaseID`), `matchDuration` = VALUES(`matchDuration`), `matchFinished` = VALUES(`matchFinished`);', 'siii', array( $matchID, $matchPhaseSet, $gameDuration, $gameFinished ) );
If they tell us the game is not finished, we will keep them in phase2
Implemented, but not pushed to git.
Did this ages ago. https://github.com/GetDotaStats/site/commit/11eda969971a6ccba487bd404968aca221f5816c
https://github.com/GetDotaStats/site/blob/master/site_files/s2/api/s2_phase_3.php#L103-L126
Change to:
If they tell us the game is not finished, we will keep them in phase2