From c4792a3b30f79722585e6bcafa6dbd1d901b3438 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Tue, 20 Sep 2022 20:24:35 +0800 Subject: [PATCH] fix: 519dbb870082f46b2cc6bfe8198787becaf38f75 --- web/app/libs/uoj-contest-lib.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/app/libs/uoj-contest-lib.php b/web/app/libs/uoj-contest-lib.php index c277481..2c3d627 100644 --- a/web/app/libs/uoj-contest-lib.php +++ b/web/app/libs/uoj-contest-lib.php @@ -169,18 +169,19 @@ function calcStandings($contest, $contest_data, &$score, &$standings, $update_co for ($i = 0; $i < $n_people; $i++) { if ($i == 0 || !$is_same_rank($standings[$i - 1], $standings[$i])) { - if ($show_reviews) { + if ($show_reviews && count($standings[$i]) == 4) { $standings[$i][] = $standings[$i][3]; $standings[$i][3] = $i + 1; } else { $standings[$i][] = $i + 1; } } else { - if ($show_reviews) { + if ($show_reviews && count($standings[$i]) == 4) { $standings[$i][] = $standings[$i][3]; + $standings[$i][3] = $standings[$i - 1][3]; + } else { + $standings[$i][] = $standings[$i - 1][3]; } - - $standings[$i][] = $standings[$i - 1][3]; } } }