From 40817e212c171ac3ca4e877a7b9ac5c14f7aa6ff Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 15 Oct 2022 07:15:22 +0800 Subject: [PATCH] fix: c77c40c341360b14086d0521e4e1071d268976d4 --- web/app/controllers/ranklist.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/web/app/controllers/ranklist.php b/web/app/controllers/ranklist.php index ac523c2..fae5771 100644 --- a/web/app/controllers/ranklist.php +++ b/web/app/controllers/ranklist.php @@ -7,19 +7,20 @@ become403Page(); } + $config = [ + 'page_len' => 100, + 'div_classes' => ['card', 'mb-3'], + 'table_classes' => ['table', 'uoj-table', 'mb-0', 'text-center'], + ]; + if (isset($_GET['type']) && $_GET['type'] == 'accepted') { - $config = array('page_len' => 100, 'by_accepted' => true); + $config['by_accepted'] = true; $title = UOJLocale::get('top solver'); } else { become404Page(); } requireLib('bootstrap5'); - - $config = [ - 'div_classes' => ['card', 'mb-3'], - 'table_classes' => ['table', 'uoj-table', 'mb-0', 'text-center'], - ]; ?>