From 58d274e3940bfb5b591ae6ceeb9783994d2e491e Mon Sep 17 00:00:00 2001 From: jiyizhuo <90495718+jiyizhuo@users.noreply.github.com> Date: Sun, 30 Mar 2025 21:01:30 +0800 Subject: [PATCH 1/2] Add message for success hacks --- web/app/controllers/judge/submit.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/app/controllers/judge/submit.php b/web/app/controllers/judge/submit.php index d9feecc7b..8cad2ab37 100644 --- a/web/app/controllers/judge/submit.php +++ b/web/app/controllers/judge/submit.php @@ -75,6 +75,16 @@ function hackJudged() { if (!$result['score']) { return; } + else { + $prob_link = UOJ_Hack::cur()->problem->getlink(); + $submission_link = UOJHack::cur()->submission->getLink(); + $hacker_link = UOJUser::getLink(UOJHack::info('hacker'), ['color' => false]); + $hack_link = UOJHack::cur()->getLink(); + + sendSystemMsg(UOJHack::info('owner'), '提交被 Hack 通知', << Date: Sun, 30 Mar 2025 21:04:24 +0800 Subject: [PATCH 2/2] Update UOJSubmissionLikeTrait.php --- web/app/models/UOJSubmissionLikeTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/models/UOJSubmissionLikeTrait.php b/web/app/models/UOJSubmissionLikeTrait.php index 9cbff8798..49f20bb90 100644 --- a/web/app/models/UOJSubmissionLikeTrait.php +++ b/web/app/models/UOJSubmissionLikeTrait.php @@ -137,7 +137,7 @@ public function getUri() { return $this->info['id']; } public function getLink() { - return '#'.$this->info['id'].''; + return '#'.$this->info['id'].''; } public function getResult($key = null) { @@ -284,4 +284,4 @@ protected function getStatusBarTDBase($name, array $cfg) { return '?'; } } -} \ No newline at end of file +}