Update Torrent.php

This commit is contained in:
Roman Kelesidis 2025-07-28 20:08:19 +03:00
commit fbc357a0f5
No known key found for this signature in database
GPG key ID: D8157C4D4C4C6DB4

View file

@ -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'],
]);
}
/**