mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 10:18:41 +00:00
feat(hack): hack success message
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2ed4d368ce
commit
1f11278815
@ -57,6 +57,15 @@ function hackJudged() {
|
|||||||
|
|
||||||
if (!$result['score']) {
|
if (!$result['score']) {
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
$problem_link = UOJHack::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
|
||||||
|
您对题目 {$problem_link} 的提交 {$submission_link} 被 {$hacker_link} 成功 Hack,请查看 Hack {$hack_link} 获取详情。
|
||||||
|
EOD);
|
||||||
}
|
}
|
||||||
if (!$ok) {
|
if (!$ok) {
|
||||||
return;
|
return;
|
||||||
|
@ -111,7 +111,7 @@ trait UOJSubmissionLikeTrait {
|
|||||||
return $this->info['id'];
|
return $this->info['id'];
|
||||||
}
|
}
|
||||||
public function getLink() {
|
public function getLink() {
|
||||||
return '<a class="text-decoration-none" href="' . $this->getUri() . '">#' . $this->info['id'] . '</a></td>';
|
return '<a class="text-decoration-none" href="' . HTML::url($this->getUri()) . '">#' . $this->info['id'] . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($key = null) {
|
public function getResult($key = null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user