diff --git a/app/Models/TorrentOperationLog.php b/app/Models/TorrentOperationLog.php index 79dc1e91..b0a55989 100644 --- a/app/Models/TorrentOperationLog.php +++ b/app/Models/TorrentOperationLog.php @@ -36,7 +36,12 @@ class TorrentOperationLog extends NexusModel public static function add(array $params) { $log = self::query()->create($params); - if (!in_array($params['action_type'], [self::ACTION_TYPE_APPROVAL_ALLOW, self::ACTION_TYPE_APPROVAL_DENY])) { + $notifyActionTypes = [ + self::ACTION_TYPE_APPROVAL_ALLOW, + self::ACTION_TYPE_APPROVAL_DENY, + self::ACTION_TYPE_APPROVAL_NONE, + ]; + if (!in_array($params['action_type'], $notifyActionTypes)) { do_log("actionType: {$params['action_type']}, do not notify"); return $log; } diff --git a/public/takeedit.php b/public/takeedit.php index 27592926..44ce763d 100644 --- a/public/takeedit.php +++ b/public/takeedit.php @@ -259,7 +259,7 @@ if ($row['banned'] == 'yes' && $row['owner'] == $CURUSER['id']) { 'msg' => nexus_trans('torrent.owner_update_torrent_msg', ['detail_url' => $torrentUrl, 'torrent_name' => $_POST['name']]), 'added' => now(), ]); - \Nexus\Database\NexusDB::cache_del("staff_message_count"); + \Nexus\Database\NexusDB::cache_del("staff_new_message_count"); } $returl = "details.php?id=$id&edited=1"; diff --git a/resources/lang/en/torrent.php b/resources/lang/en/torrent.php index fc6f5731..d5d1c216 100644 --- a/resources/lang/en/torrent.php +++ b/resources/lang/en/torrent.php @@ -54,6 +54,11 @@ return [ 'type_text' => 'Cancel banned', 'notify_subject' => 'Torrent was unbanned', 'notify_msg' => 'Your torrent: [url=:detail_url]:torrent_name[/url] unbanned by :operator', + ], + \App\Models\TorrentOperationLog::ACTION_TYPE_APPROVAL_NONE => [ + 'type_text' => 'Cancel banned', + 'notify_subject' => 'Torrent was unbanned', + 'notify_msg' => 'Your torrent: [url=:detail_url]:torrent_name[/url] unbanned by :operator', ] ], 'owner_update_torrent_subject' => 'Banned torrent have been updated', diff --git a/resources/lang/zh_CN/torrent.php b/resources/lang/zh_CN/torrent.php index ac67265f..52091cce 100644 --- a/resources/lang/zh_CN/torrent.php +++ b/resources/lang/zh_CN/torrent.php @@ -54,6 +54,11 @@ return [ 'type_text' => '取消禁止', 'notify_subject' => '种子取消禁止', 'notify_msg' => '你的种子:[url=:detail_url]:torrent_name[/url] 被 :operator 取消禁止', + ], + \App\Models\TorrentOperationLog::ACTION_TYPE_APPROVAL_NONE => [ + 'type_text' => '取消禁止', + 'notify_subject' => '种子取消禁止', + 'notify_msg' => '你的种子:[url=:detail_url]:torrent_name[/url] 被 :operator 取消禁止', ] ], 'owner_update_torrent_subject' => '被禁种子已更新', diff --git a/resources/lang/zh_TW/torrent.php b/resources/lang/zh_TW/torrent.php index 8e8a59bd..d3ddd076 100644 --- a/resources/lang/zh_TW/torrent.php +++ b/resources/lang/zh_TW/torrent.php @@ -54,6 +54,11 @@ return [ 'type_text' => '取消禁止', 'notify_subject' => '種子取消禁止', 'notify_msg' => '你的種子:[url=:detail_url]:torrent_name[/url] 被 :operator 取消禁止', + ], + \App\Models\TorrentOperationLog::ACTION_TYPE_APPROVAL_NONE => [ + 'type_text' => '取消禁止', + 'notify_subject' => '種子取消禁止', + 'notify_msg' => '你的種子:[url=:detail_url]:torrent_name[/url] 被 :operator 取消禁止', ] ], 'owner_update_torrent_subject' => '被禁種子已更新',