diff --git a/upload/ajax/view_torrent.php b/upload/ajax/view_torrent.php
index e339acc90..5f9ed7227 100644
--- a/upload/ajax/view_torrent.php
+++ b/upload/ajax/view_torrent.php
@@ -10,6 +10,9 @@ if (!isset($this->request['attach_id']))
}
$attach_id = (int) $this->request['attach_id'];
+global $bnc_error;
+$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']);
$filename = get_attachments_dir() .'/'. $torrent['physical_filename'];
@@ -126,7 +129,8 @@ class torrent
{
if (is_string($cur_files_ary))
{
- bb_die($lang['ERROR_BUILD']);
+ $GLOBALS['bnc_error'] = 1;
+ break(1);
}
$cur_files_ary[] = $this->build_file_item($name, $length);
}
@@ -169,4 +173,6 @@ function clean_tor_dirname ($dirname)
return str_replace(array('[', ']', '<', '>', "'"), array('[', ']', '<', '>', '''), $dirname);
}
+if ($bnc_error) $tor_filelist = ''.$lang['ERROR_BUILD'].'
'.$tor_filelist;
+
$this->response['html'] = $tor_filelist;
\ No newline at end of file