mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
parent
ab9aa9515a
commit
1700556486
@ -17,18 +17,15 @@ $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_contents = @file_get_contents($filename)) === false)
|
if (!@file_exists($filename) || (false === ($file_contents = @file_get_contents($filename))))
|
||||||
{
|
{
|
||||||
if (!file_exists($filename))
|
if (IS_AM)
|
||||||
{
|
{
|
||||||
if (IS_AM)
|
$this->ajax_die($lang['ERROR_NO_ATTACHMENT'] ."\n\n". htmlCHR($filename));
|
||||||
{
|
}
|
||||||
$this->ajax_die($lang['ERROR_NO_ATTACHMENT'] ."\n\n". htmlCHR($filename));
|
else
|
||||||
}
|
{
|
||||||
else
|
$this->ajax_die($lang['ERROR_NO_ATTACHMENT']);
|
||||||
{
|
|
||||||
$this->ajax_die($lang['ERROR_NO_ATTACHMENT']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user