This commit is contained in:
Roman Kelesidis 2023-12-28 14:32:36 +07:00
parent f3b028a92f
commit a4196e1356
2 changed files with 6 additions and 2 deletions

View File

@ -193,7 +193,7 @@ if ($mode == 'user' && (!empty($_POST['username']) || $user_id))
if (!empty($_POST['username']))
{
$this_userdata = get_userdata($_POST['username'], true);
$user_id = $this_userdata['user_id'];
$user_id = $this_userdata ? $this_userdata['user_id'] : false;
}
else
{

6
dl.php
View File

@ -38,6 +38,10 @@ function send_file_to_browser($attachment, $upload_dir)
{
$attachment['mimetype'] = 'application/octet-stream';
}
else
{
header('Cache-Control: public, max-age=3600');
}
//bt
if (!(isset($_GET['original']) && !IS_USER))
@ -168,7 +172,7 @@ $datastore->rm('cat_forums');
//
// Check tor status
//
if (!IS_AM)
if (!IS_AM && (strpos($attachment['mimetype'], 'bittorrent') !== false))
{
$sql = "SELECT tor_status, poster_id FROM " . BB_BT_TORRENTS . " WHERE attach_id = " . (int) $attachment['attach_id'];