mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 03:17:23 +08:00
approval none send cancel ban msg too
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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' => '被禁种子已更新',
|
||||
|
||||
@@ -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' => '被禁種子已更新',
|
||||
|
||||
Reference in New Issue
Block a user