Update view_torrent.php

This commit is contained in:
Roman Kelesidis 2023-10-18 18:59:17 +07:00
parent 6920317f10
commit ab9aa9515a

View File

@ -17,7 +17,9 @@ $torrent = DB()->fetch_row("SELECT at.attach_id, at.physical_filename FROM ". BB
if (!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']); if (!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']);
$filename = get_attachments_dir() .'/'. $torrent['physical_filename']; $filename = get_attachments_dir() .'/'. $torrent['physical_filename'];
if (!@file_exists($filename) || (false === ($file_contents = @file_get_contents($filename)))) if (($file_contents = @file_get_contents($filename)) === false)
{
if (!file_exists($filename))
{ {
if (IS_AM) if (IS_AM)
{ {
@ -28,6 +30,7 @@ if (!@file_exists($filename) || (false === ($file_contents = @file_get_contents(
$this->ajax_die($lang['ERROR_NO_ATTACHMENT']); $this->ajax_die($lang['ERROR_NO_ATTACHMENT']);
} }
} }
}
// Построение списка // Построение списка
$tor_filelist = build_tor_filelist($file_contents); $tor_filelist = build_tor_filelist($file_contents);