From ddf5ec741326a24a1f8b28122a0594675a9963f5 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Tue, 4 Oct 2022 07:36:05 +0800 Subject: [PATCH] fix: anonymous if superuser removes a solution --- web/app/controllers/problem_solutions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/controllers/problem_solutions.php b/web/app/controllers/problem_solutions.php index f368e50..44214c1 100644 --- a/web/app/controllers/problem_solutions.php +++ b/web/app/controllers/problem_solutions.php @@ -60,7 +60,7 @@ if ($blog['poster'] != $myUser['username']) { $blog_link = getBlogLink($blog['id']); $poster_user_link = getUserLink($blog['poster']); - $admin_user_link = getUserLink($myUser['username']); + $admin_user_link = isSuperUser($myUser) ? '管理员' : getUserLink($myUser['username']); $content = <<{$poster_user_link} 您好:

您为问题 #{$problem['id']} ({$problem['title']}) 提交的题解 {$blog_link} 已经被 {$admin_user_link} 移除。