mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Little improvements (#1244)
This commit is contained in:
parent
c4df759d09
commit
fbc4749ca9
4 changed files with 5 additions and 8 deletions
|
@ -31,7 +31,7 @@ if (!file_exists($filename) || !$file_contents = file_get_contents($filename)) {
|
|||
try {
|
||||
$tor = \Arokettu\Bencode\Bencode::decode($file_contents, dictType: \Arokettu\Bencode\Bencode\Collection::ARRAY);
|
||||
} catch (\Exception $e) {
|
||||
$this->response['html'] = $lang['TORFILE_INVALID'];
|
||||
$this->response['html'] = htmlCHR("{$lang['TORFILE_INVALID']}: {$e->getMessage()}");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ try {
|
|||
$torrent = \Arokettu\Bencode\Bencode::decode($file_contents, dictType: \Arokettu\Bencode\Bencode\Collection::ARRAY);
|
||||
} catch (\Exception $e) {
|
||||
http_response_code(410);
|
||||
die($lang['TORFILE_INVALID']);
|
||||
die(htmlCHR("{$lang['TORFILE_INVALID']}: {$e->getMessage()}"));
|
||||
}
|
||||
|
||||
if (isset($torrent['info']['private']) && IS_GUEST) {
|
||||
|
|
|
@ -740,7 +740,7 @@ class Attach
|
|||
bb_die('No file content sent');
|
||||
break;
|
||||
case UPLOAD_ERR_INI_SIZE:
|
||||
bb_die('upload_max_filesize setting: ' . ini_get('upload_max_filesize'));
|
||||
bb_die('php.ini<br><b>upload_max_filesize</b> setting: ' . ini_get('upload_max_filesize'));
|
||||
break;
|
||||
case UPLOAD_ERR_FORM_SIZE:
|
||||
bb_die('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form');
|
||||
|
@ -757,9 +757,6 @@ class Attach
|
|||
case UPLOAD_ERR_NO_TMP_DIR:
|
||||
bb_die('Missing a temporary folder');
|
||||
break;
|
||||
default:
|
||||
bb_die('Unknown upload error');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ class Torrent
|
|||
try {
|
||||
$tor = \Arokettu\Bencode\Bencode::decode($file_contents, dictType: \Arokettu\Bencode\Bencode\Collection::ARRAY);
|
||||
} catch (\Exception $e) {
|
||||
self::torrent_error_exit($lang['TORFILE_INVALID']);
|
||||
self::torrent_error_exit(htmlCHR("{$lang['TORFILE_INVALID']}: {$e->getMessage()}"));
|
||||
}
|
||||
|
||||
if ($bb_cfg['bt_disable_dht']) {
|
||||
|
@ -564,7 +564,7 @@ class Torrent
|
|||
try {
|
||||
$tor = \Arokettu\Bencode\Bencode::decode($file_contents, dictType: \Arokettu\Bencode\Bencode\Collection::ARRAY);
|
||||
} catch (\Exception $e) {
|
||||
bb_die($lang['TORFILE_INVALID']);
|
||||
bb_die(htmlCHR("{$lang['TORFILE_INVALID']}: {$e->getMessage()}"));
|
||||
}
|
||||
|
||||
// Get tracker announcer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue