mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Исправление просмотра содержимого торрент-файла
This commit is contained in:
parent
884a0b042b
commit
47f9c6d376
1 changed files with 5 additions and 6 deletions
|
@ -8,20 +8,19 @@ if (!isset($this->request['t']))
|
||||||
{
|
{
|
||||||
$this->ajax_die($lang['EMPTY_ATTACH_ID']);
|
$this->ajax_die($lang['EMPTY_ATTACH_ID']);
|
||||||
}
|
}
|
||||||
$attach_id = (int) $this->request['attach_id'];
|
$topic_id = (int) $this->request['t'];
|
||||||
|
|
||||||
global $bnc_error;
|
global $bnc_error;
|
||||||
$bnc_error = 0;
|
$bnc_error = 0;
|
||||||
|
|
||||||
//$torrent = DB()->fetch_row("SELECT at.attach_id, at.physical_filename FROM ". BB_ATTACHMENTS_DESC ." at WHERE at.attach_id = $attach_id LIMIT 1");
|
// Получение торрент-файла
|
||||||
if (!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']);
|
$file_path = get_attach_path($topic_id, 8);
|
||||||
//$filename = get_attachments_dir() .'/'. $torrent['physical_filename'];
|
|
||||||
|
|
||||||
if (($file_contents = @file_get_contents($filename)) === false)
|
if (($file_contents = @file_get_contents($file_path)) === false)
|
||||||
{
|
{
|
||||||
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($file_path));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue