From 2234c8145bf6ec3f00ea8549a9e6850507775e8a Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Tue, 14 Nov 2023 14:33:17 +0700 Subject: [PATCH] Use TORRENT_EXT constants for definition torrent extension (#1096) --- library/attach_mod/displaying_torrent.php | 2 +- src/Legacy/Torrent.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/attach_mod/displaying_torrent.php b/library/attach_mod/displaying_torrent.php index 0bd546b29..965ec08a5 100644 --- a/library/attach_mod/displaying_torrent.php +++ b/library/attach_mod/displaying_torrent.php @@ -88,7 +88,7 @@ if ($tor_auth_reg || $tor_auth_del) { $tracker_link = ($tor_reged) ? $unreg_tor_url : $reg_tor_url; } -$display_name = wbr($t_data['topic_title']) . ' [' . $bb_cfg['server_name'] . '-' . $bt_topic_id . ']' . '.torrent'; +$display_name = wbr($t_data['topic_title']) . ' [' . $bb_cfg['server_name'] . '-' . $bt_topic_id . ']' . '.' . TORRENT_EXT; if (!$tor_reged) { $template->assign_block_vars('postrow.attach.tor_not_reged', [ diff --git a/src/Legacy/Torrent.php b/src/Legacy/Torrent.php index f47150a91..c56b64e57 100644 --- a/src/Legacy/Torrent.php +++ b/src/Legacy/Torrent.php @@ -599,7 +599,7 @@ class Torrent // Send torrent $output = \Arokettu\Bencode\Bencode::encode($tor); - $dl_fname = html_entity_decode($topic_title, ENT_QUOTES, 'UTF-8') . ' [' . $bb_cfg['server_name'] . '-' . $topic_id . ']' . '.torrent'; + $dl_fname = html_entity_decode($topic_title, ENT_QUOTES, 'UTF-8') . ' [' . $bb_cfg['server_name'] . '-' . $topic_id . ']' . '.' . TORRENT_EXT; if (!empty($_COOKIE['explain'])) { $out = "attach path: $filename

";