From 4f5bbf82a529039a74248666581fdf900cf25c31 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Mon, 7 Nov 2022 15:44:01 +0800 Subject: [PATCH] fix(web/problem): page title --- web/app/controllers/problem.php | 8 +++++++- web/app/controllers/problem_solutions.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/web/app/controllers/problem.php b/web/app/controllers/problem.php index ca51a30..1b9be67 100644 --- a/web/app/controllers/problem.php +++ b/web/app/controllers/problem.php @@ -210,9 +210,15 @@ if ($pre_submit_check_ret === true && !$no_more_submission) { } $conf = UOJProblem::cur()->getProblemConf(); + +if (UOJContest::cur()) { + $pageTitle = UOJProblem::cur()->getTitle(['with' => 'letter', 'simplify' => true]); +} else { + $pageTitle = UOJProblem::cur()->getTitle(['with' => 'id']); +} ?> - +
diff --git a/web/app/controllers/problem_solutions.php b/web/app/controllers/problem_solutions.php index 8b31e3d..9573abd 100644 --- a/web/app/controllers/problem_solutions.php +++ b/web/app/controllers/problem_solutions.php @@ -120,7 +120,7 @@ $pag_config['tail'] = "order by zan desc, post_time desc, id asc"; $pag = new Paginator($pag_config); ?> - +getTitle(['with' => 'id']))) ?>