diff --git a/library/attach_mod/displaying_torrent.php b/library/attach_mod/displaying_torrent.php index e7286b1e8..3d10d7ff6 100644 --- a/library/attach_mod/displaying_torrent.php +++ b/library/attach_mod/displaying_torrent.php @@ -215,6 +215,7 @@ if ($tor_reged && $tor_info) { 'MAGNET' => $tor_magnet, 'HASH' => !empty($tor_info['info_hash']) ? strtoupper(bin2hex($tor_info['info_hash'])) : false, 'HASH_V2' => !empty($tor_info['info_hash_v2']) ? strtoupper(bin2hex($tor_info['info_hash_v2'])) : false, + 'FILELIST_LINK' => !empty($tor_info['info_hash_v2']) ? (FILELIST_URL . $tor_info['topic_id']) : false, 'REGED_TIME' => bb_date($tor_info['reg_time']), 'REGED_DELTA' => delta_time($tor_info['reg_time']), 'TORRENT_SIZE' => humn_size($tor_size), diff --git a/library/includes/file_list_v2.php b/library/includes/file_list_v2.php index d5d84fcf0..650d4d5f1 100644 --- a/library/includes/file_list_v2.php +++ b/library/includes/file_list_v2.php @@ -19,7 +19,7 @@ if ($bb_cfg['bt_disable_dht'] && IS_GUEST) { die($lang['BT_PRIVATE_TRACKER']); } -$topic_id = !empty($_GET['topic']) ? (int)$_GET['topic'] : (http_response_code(404) && die($lang['INVALID_TOPIC_ID'])); +$topic_id = !empty($_GET['filelist']) ? (int)$_GET['filelist'] : (http_response_code(404) && die($lang['INVALID_TOPIC_ID'])); $sql = 'SELECT t.attach_id, t.info_hash_v2, t.size, ad.physical_filename FROM ' . BB_BT_TORRENTS . ' t diff --git a/library/includes/init_bb.php b/library/includes/init_bb.php index f1a767a99..f42ad46b0 100644 --- a/library/includes/init_bb.php +++ b/library/includes/init_bb.php @@ -296,6 +296,7 @@ define('POSTING_URL', $bb_cfg['posting_url']); define('PROFILE_URL', 'profile.php?mode=viewprofile&u='); define('BONUS_URL', 'profile.php?mode=bonus'); define('TOPIC_URL', 'viewtopic.php?t='); +define('FILELIST_URL', 'viewtopic.php?filelist='); define('USER_AGENT', strtolower($_SERVER['HTTP_USER_AGENT'])); diff --git a/styles/templates/default/viewtopic_attach.tpl b/styles/templates/default/viewtopic_attach.tpl index 84fb1ec59..f76e5887e 100644 --- a/styles/templates/default/viewtopic_attach.tpl +++ b/styles/templates/default/viewtopic_attach.tpl @@ -171,7 +171,7 @@

{postrow.attach.tor_reged.FILESIZE}

-

...

+

...