mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-30 18:24:29 +01:00
Close #265
This commit is contained in:
parent
b7a3bde4c8
commit
8e811cec44
@ -1135,6 +1135,7 @@
|
|||||||
$config['error']['toomanyreports'] = _('You can\'t report that many posts at once.');
|
$config['error']['toomanyreports'] = _('You can\'t report that many posts at once.');
|
||||||
$config['error']['invalidpassword'] = _('Wrong password…');
|
$config['error']['invalidpassword'] = _('Wrong password…');
|
||||||
$config['error']['invalidimg'] = _('Invalid image.');
|
$config['error']['invalidimg'] = _('Invalid image.');
|
||||||
|
$config['error']['phpfileserror'] = _('Upload failure (file #%index%): Error code %code%. Refer to <a href="http://php.net/manual/en/features.file-upload.errors.php">http://php.net/manual/en/features.file-upload.errors.php</a>; post discarded.');
|
||||||
$config['error']['unknownext'] = _('Unknown file extension.');
|
$config['error']['unknownext'] = _('Unknown file extension.');
|
||||||
$config['error']['filesize'] = _('Maximum file size: %maxsz% bytes<br>Your file\'s size: %filesz% bytes');
|
$config['error']['filesize'] = _('Maximum file size: %maxsz% bytes<br>Your file\'s size: %filesz% bytes');
|
||||||
$config['error']['maxsize'] = _('The file was too big.');
|
$config['error']['maxsize'] = _('The file was too big.');
|
||||||
|
7
post.php
7
post.php
@ -655,6 +655,13 @@ if (isset($_POST['delete'])) {
|
|||||||
if ($post['has_file']) {
|
if ($post['has_file']) {
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($_FILES as $key => $file) {
|
foreach ($_FILES as $key => $file) {
|
||||||
|
if ($file['error'] > 0) {
|
||||||
|
error(sprintf3($config['error']['phpfileserror'], array(
|
||||||
|
'index' => $i+1,
|
||||||
|
'code' => $file['error']
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
|
||||||
if ($file['size'] && $file['tmp_name']) {
|
if ($file['size'] && $file['tmp_name']) {
|
||||||
$file['filename'] = urldecode($file['name']);
|
$file['filename'] = urldecode($file['name']);
|
||||||
$file['extension'] = strtolower(mb_substr($file['filename'], mb_strrpos($file['filename'], '.') + 1));
|
$file['extension'] = strtolower(mb_substr($file['filename'], mb_strrpos($file['filename'], '.') + 1));
|
||||||
|
Loading…
Reference in New Issue
Block a user