mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
parent
c57233414f
commit
c4df759d09
7 changed files with 23 additions and 10 deletions
|
@ -19,7 +19,7 @@
|
|||
- search.php parameter sanitizing [\#1213](https://github.com/torrentpier/torrentpier/pull/1213) ([kovalensky](https://github.com/kovalensky), [belomaxorka](https://github.com/belomaxorka))
|
||||
- Limit execution time for forum file-listing [\#1211](https://github.com/torrentpier/torrentpier/pull/1211) ([kovalensky](https://github.com/kovalensky), [belomaxorka](https://github.com/belomaxorka))
|
||||
- Some reported bugfixes [\#1214](https://github.com/torrentpier/torrentpier/pull/1214) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Minor improvements [\#1215](https://github.com/torrentpier/torrentpier/pull/1215), [\#1217](https://github.com/torrentpier/torrentpier/pull/1217), [\#1219](https://github.com/torrentpier/torrentpier/pull/1219), [\#1220](https://github.com/torrentpier/torrentpier/pull/1220), [\#1224](https://github.com/torrentpier/torrentpier/pull/1224), [\#1228](https://github.com/torrentpier/torrentpier/pull/1228), [\#1229](https://github.com/torrentpier/torrentpier/pull/1229), [\#1230](https://github.com/torrentpier/torrentpier/pull/1230), [\#1234](https://github.com/torrentpier/torrentpier/pull/1234), [\#1236](https://github.com/torrentpier/torrentpier/pull/1236) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Minor improvements [\#1215](https://github.com/torrentpier/torrentpier/pull/1215), [\#1217](https://github.com/torrentpier/torrentpier/pull/1217), [\#1219](https://github.com/torrentpier/torrentpier/pull/1219), [\#1220](https://github.com/torrentpier/torrentpier/pull/1220), [\#1224](https://github.com/torrentpier/torrentpier/pull/1224), [\#1228](https://github.com/torrentpier/torrentpier/pull/1228), [\#1229](https://github.com/torrentpier/torrentpier/pull/1229), [\#1230](https://github.com/torrentpier/torrentpier/pull/1230), [\#1234](https://github.com/torrentpier/torrentpier/pull/1234), [\#1236](https://github.com/torrentpier/torrentpier/pull/1236), [\#1243](https://github.com/torrentpier/torrentpier/pull/1243) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Fixed extensions issue [\#1218](https://github.com/torrentpier/torrentpier/pull/1218) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Fixed broken sorting in group.php [\#1221](https://github.com/torrentpier/torrentpier/pull/1221) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Code re-formatting [\#1225](https://github.com/torrentpier/torrentpier/pull/1225) ([kovalensky](https://github.com/kovalensky))
|
||||
|
|
|
@ -30,7 +30,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) {
|
||||
} catch (\Exception $e) {
|
||||
$this->response['html'] = $lang['TORFILE_INVALID'];
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ if ($bb_cfg['flist_max_files']) {
|
|||
|
||||
try {
|
||||
$torrent = \Arokettu\Bencode\Bencode::decode($file_contents, dictType: \Arokettu\Bencode\Bencode\Collection::ARRAY);
|
||||
} catch (\Exception) {
|
||||
} catch (\Exception $e) {
|
||||
http_response_code(410);
|
||||
die($lang['TORFILE_INVALID']);
|
||||
}
|
||||
|
|
|
@ -735,18 +735,31 @@ class Attach
|
|||
$this->type = $_FILES['fileupload']['type'];
|
||||
|
||||
if (isset($_FILES['fileupload']['error'])) {
|
||||
switch($_FILES['fileupload']['error']) {
|
||||
switch ($_FILES['fileupload']['error']) {
|
||||
case UPLOAD_ERR_NO_FILE:
|
||||
bb_die('No file content sent');
|
||||
// no break
|
||||
break;
|
||||
case UPLOAD_ERR_INI_SIZE:
|
||||
bb_die('upload_max_filesize setting: ' . ini_get('upload_max_filesize'));
|
||||
// no break
|
||||
break;
|
||||
case UPLOAD_ERR_FORM_SIZE:
|
||||
bb_die('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form');
|
||||
break;
|
||||
case UPLOAD_ERR_CANT_WRITE:
|
||||
bb_die('Failed to write file to disk, check permissions');
|
||||
// no break
|
||||
break;
|
||||
case UPLOAD_ERR_PARTIAL:
|
||||
bb_die('The uploaded file was only partially uploaded');
|
||||
break;
|
||||
case UPLOAD_ERR_EXTENSION:
|
||||
bb_die('File upload stopped by extension');
|
||||
break;
|
||||
case UPLOAD_ERR_NO_TMP_DIR:
|
||||
bb_die('Missing a temporary folder');
|
||||
break;
|
||||
default:
|
||||
bb_die('Unknown upload error');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -563,7 +563,7 @@ class Torrent
|
|||
$file_contents = file_get_contents($filename);
|
||||
try {
|
||||
$tor = \Arokettu\Bencode\Bencode::decode($file_contents, dictType: \Arokettu\Bencode\Bencode\Collection::ARRAY);
|
||||
} catch (\Exception) {
|
||||
} catch (\Exception $e) {
|
||||
bb_die($lang['TORFILE_INVALID']);
|
||||
}
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ function build_poll_add_form (src_el)
|
|||
<p style="float: left;<!-- IF TEXT_BUTTONS --> padding: 4px 0 3px;<!-- ELSE --> padding-top: 5px;<!-- ENDIF -->">
|
||||
<!-- IF postrow.IS_UNREAD -->{MINIPOST_IMG_NEW}<!-- ELSE -->{MINIPOST_IMG}<!-- ENDIF -->
|
||||
<a class="small" href="{POST_URL}{postrow.POST_ID}#{postrow.POST_ID}" title="{L_POST_LINK}">{postrow.POST_DATE} | #{postrow.POST_NUMBER}</a>
|
||||
<!-- IF postrow.POSTER_AUTHOR -->· <span>{L_AUTHOR}</span><!-- ENDIF -->
|
||||
<!-- IF postrow.POSTER_AUTHOR and not postrow.POSTER_GUEST -->· <span>{L_AUTHOR}</span><!-- ENDIF -->
|
||||
<!-- IF postrow.POSTED_AFTER -->
|
||||
<span class="posted_since">({L_POSTED_AFTER} {postrow.POSTED_AFTER})</span>
|
||||
<!-- ENDIF -->
|
||||
|
|
|
@ -697,7 +697,7 @@ for ($i = 0; $i < $total_posts; $i++) {
|
|||
'POSTER_BOT' => $poster_bot,
|
||||
'POSTER_GUEST' => $poster_guest,
|
||||
'POSTER_ID' => $poster_id,
|
||||
'POSTER_AUTHOR' => !$poster_guest && ($poster_id == $t_data['topic_poster']),
|
||||
'POSTER_AUTHOR' => ($poster_id == $t_data['topic_poster']),
|
||||
'POSTER_GENDER' => !$poster_guest ? genderImage((int)$postrow[$i]['user_gender']) : '',
|
||||
'POSTED_AFTER' => $prev_post_time ? delta_time($postrow[$i]['post_time'], $prev_post_time) : '',
|
||||
'IS_UNREAD' => is_unread($postrow[$i]['post_time'], $topic_id, $forum_id),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue