fix torrent update notify staff

This commit is contained in:
xiaomlove
2022-06-16 02:04:32 +08:00
parent e12221fce9
commit 52f5623058
2 changed files with 13 additions and 18 deletions

View File

@@ -251,6 +251,16 @@ else
$searchRep = new \App\Repositories\SearchRepository();
$searchRep->updateTorrent($id);
if ($row['banned'] == 'yes' && $row['owner'] == $CURUSER['id']) {
$torrentUrl = sprintf('%s/details.php?id=%s', getSchemeAndHttpHost(), $row['id']);
\App\Models\StaffMessage::query()->insert([
'sender' => $CURUSER['id'],
'subject' => nexus_trans('torrent.owner_update_torrent_subject', ['detail_url' => $torrentUrl, 'torrent_name' => $_POST['name']]),
'msg' => nexus_trans('torrent.owner_update_torrent_msg', ['detail_url' => $torrentUrl, 'torrent_name' => $_POST['name']]),
'added' => now(),
]);
}
$returl = "details.php?id=$id&edited=1";
if (isset($_POST["returnto"]))
$returl = $_POST["returnto"];