Revert "Moved file_list_v2.php back to includes (#1303)"

This reverts commit be5c34a951.
This commit is contained in:
Roman Kelesidis 2024-01-02 19:31:07 +07:00
commit 7d32944d36
3 changed files with 3 additions and 6 deletions

View file

@ -7,9 +7,7 @@
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License * @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
*/ */
if (!defined('BB_ROOT')) { require __DIR__ . '/common.php';
die(basename(__FILE__));
}
// Start session management // Start session management
$user->session_start(); $user->session_start();
@ -19,7 +17,7 @@ if ($bb_cfg['bt_disable_dht'] && IS_GUEST) {
bb_simple_die($lang['BT_PRIVATE_TRACKER']); bb_simple_die($lang['BT_PRIVATE_TRACKER']);
} }
$topic_id = !empty($_GET['filelist']) ? (int)$_GET['filelist'] : (http_response_code(404) && die($lang['INVALID_TOPIC_ID'])); $topic_id = !empty($_GET['topic']) ? (int)$_GET['topic'] : (http_response_code(404) && die($lang['INVALID_TOPIC_ID']));
$sql = 'SELECT t.attach_id, t.info_hash, t.info_hash_v2, t.size, ad.physical_filename $sql = 'SELECT t.attach_id, t.info_hash, t.info_hash_v2, t.size, ad.physical_filename
FROM ' . BB_BT_TORRENTS . ' t FROM ' . BB_BT_TORRENTS . ' t

View file

@ -296,7 +296,7 @@ define('POSTING_URL', $bb_cfg['posting_url']);
define('PROFILE_URL', 'profile.php?mode=viewprofile&u='); define('PROFILE_URL', 'profile.php?mode=viewprofile&u=');
define('BONUS_URL', 'profile.php?mode=bonus'); define('BONUS_URL', 'profile.php?mode=bonus');
define('TOPIC_URL', 'viewtopic.php?t='); define('TOPIC_URL', 'viewtopic.php?t=');
define('FILELIST_URL', 'viewtopic.php?filelist='); define('FILELIST_URL', 'filelist.php?topic=');
define('USER_AGENT', strtolower($_SERVER['HTTP_USER_AGENT'])); define('USER_AGENT', strtolower($_SERVER['HTTP_USER_AGENT']));

View file

@ -24,7 +24,6 @@ $page_cfg['load_tpl_vars'] = [
]; ];
$newest = $next_topic_id = 0; $newest = $next_topic_id = 0;
$file_list = isset($_GET['filelist']) ? include(INC_DIR . '/file_list_v2.php') : 0;
$start = isset($_GET['start']) ? abs((int)$_GET['start']) : 0; $start = isset($_GET['start']) ? abs((int)$_GET['start']) : 0;
$topic_id = isset($_GET[POST_TOPIC_URL]) ? (int)$_GET[POST_TOPIC_URL] : 0; $topic_id = isset($_GET[POST_TOPIC_URL]) ? (int)$_GET[POST_TOPIC_URL] : 0;
$post_id = (!$topic_id && isset($_GET[POST_POST_URL])) ? (int)$_GET[POST_POST_URL] : 0; $post_id = (!$topic_id && isset($_GET[POST_POST_URL])) ? (int)$_GET[POST_POST_URL] : 0;