From fbc357a0f53d46fb60fd14f60534c64f2144b27a Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Mon, 28 Jul 2025 20:08:19 +0300 Subject: [PATCH] Update Torrent.php --- src/Legacy/Torrent.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Legacy/Torrent.php b/src/Legacy/Torrent.php index ccac74eb0..98fea29ef 100644 --- a/src/Legacy/Torrent.php +++ b/src/Legacy/Torrent.php @@ -181,7 +181,7 @@ class Torrent */ public static function delete_torrent($attach_id, $mode = '') { - global $lang, $reg_mode, $topic_id; + global $lang, $reg_mode, $topic_id, $log_action; $attach_id = (int)$attach_id; $reg_mode = $mode; @@ -201,6 +201,13 @@ class Torrent self::torrent_auth_check($forum_id, $poster_id); self::tracker_unregister($attach_id); delete_attachment(0, $attach_id); + + // Log action + $log_action->mod('mod_topic_tor_delete', [ + 'forum_id' => $torrent['forum_id'], + 'topic_id' => $torrent['topic_id'], + 'topic_title' => $torrent['topic_title'], + ]); } /**