Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions web/app/controllers/judge/submit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 通知', <<<EOD
您对题目 {$prob_link} 的提交 {$submission_link} 已被 {$hacker_link} 成功 Hack,请查看 Hack {$hack_link} 信息获取详情。
EOD);
}
if (!$ok) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions web/app/models/UOJSubmissionLikeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function getUri() {
return $this->info['id'];
}
public function getLink() {
return '<a href="'.$this->getUri().'">#'.$this->info['id'].'</a></td>';
return '<a href="'.HTML::url($this->getUri()).'">#'.$this->info['id'].'</a>';
}

public function getResult($key = null) {
Expand Down Expand Up @@ -284,4 +284,4 @@ protected function getStatusBarTDBase($name, array $cfg) {
return '?';
}
}
}
}