mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01:00
[ticket/13904] Add language entries for error messages in upload class
PHPBB3-13904
This commit is contained in:
parent
327e36a4d6
commit
70ad0c6a8f
@ -105,11 +105,13 @@ $lang = array_merge($lang, array(
|
||||
'AVATAR_EMPTY_FILEUPLOAD' => 'The uploaded avatar file is empty.',
|
||||
'AVATAR_INVALID_FILENAME' => '%s is an invalid filename.',
|
||||
'AVATAR_NOT_UPLOADED' => 'Avatar could not be uploaded.',
|
||||
'AVATAR_NO_TEMP_DIR' => 'Temporary folder could not be found or is not writable.',
|
||||
'AVATAR_NO_SIZE' => 'The width or height of the linked avatar could not be determined. Please enter them manually.',
|
||||
'AVATAR_PARTIAL_UPLOAD' => 'The specified file was only partially uploaded.',
|
||||
'AVATAR_PHP_SIZE_NA' => 'The avatar’s filesize is too large.<br />The maximum allowed filesize set in php.ini could not be determined.',
|
||||
'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar’s filesize is too large. The maximum allowed upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
|
||||
'AVATAR_REMOTE_UPLOAD_TIMEOUT' => 'The specified avatar could not be uploaded because the request timed out.',
|
||||
'AVATAR_PHP_UPLOAD_STOPPED' => 'A PHP extension has stopped the file upload.',
|
||||
'AVATAR_URL_INVALID' => 'The URL you specified is invalid.',
|
||||
'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.',
|
||||
'AVATAR_WRONG_FILESIZE' => 'The avatar’s filesize must be between 0 and %1$d %2$s.',
|
||||
|
@ -176,8 +176,10 @@ $lang = array_merge($lang, array(
|
||||
'NO_POLL_TITLE' => 'You have to enter a poll title.',
|
||||
'NO_POST' => 'The requested post does not exist.',
|
||||
'NO_POST_MODE' => 'No post mode specified.',
|
||||
'NO_TEMP_DIR' => 'Temporary folder could not be found or is not writable.',
|
||||
|
||||
'PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded.',
|
||||
'PHP_UPLOAD_STOPPED' => 'A PHP extension has stopped the file upload.',
|
||||
'PHP_SIZE_NA' => 'The attachment’s file size is too large.<br />Could not determine the maximum size defined by PHP in php.ini.',
|
||||
'PHP_SIZE_OVERRUN' => 'The attachment’s file size is too large, the maximum upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
|
||||
'PLACE_INLINE' => 'Place inline',
|
||||
|
@ -245,15 +245,12 @@ class upload
|
||||
break;
|
||||
|
||||
case UPLOAD_ERR_NO_TMP_DIR:
|
||||
$error = 'Temporary folder could not be found. Please check your PHP installation.';
|
||||
break;
|
||||
|
||||
case UPLOAD_ERR_CANT_WRITE:
|
||||
$error = 'Can’t write to temporary folder.';
|
||||
$error = $this->language->lang($this->error_prefix . 'NO_TEMP_DIR');
|
||||
break;
|
||||
|
||||
case UPLOAD_ERR_EXTENSION:
|
||||
$error = 'A PHP extension has stopped the file upload.';
|
||||
$error = $this->language->lang($this->error_prefix . 'PHP_UPLOAD_STOPPED');
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -110,9 +110,9 @@ class phpbb_files_upload_test extends phpbb_test_case
|
||||
array(UPLOAD_ERR_FORM_SIZE, 'WRONG_FILESIZE'),
|
||||
array(UPLOAD_ERR_PARTIAL, 'PARTIAL_UPLOAD'),
|
||||
array(UPLOAD_ERR_NO_FILE, 'NOT_UPLOADED'),
|
||||
array(UPLOAD_ERR_NO_TMP_DIR, 'Temporary folder could not be found. Please check your PHP installation.'),
|
||||
array(UPLOAD_ERR_CANT_WRITE, 'Can’t write to temporary folder.'),
|
||||
array(UPLOAD_ERR_EXTENSION, 'A PHP extension has stopped the file upload.'),
|
||||
array(UPLOAD_ERR_NO_TMP_DIR, 'NO_TEMP_DIR'),
|
||||
array(UPLOAD_ERR_CANT_WRITE, 'NO_TEMP_DIR'),
|
||||
array(UPLOAD_ERR_EXTENSION, 'PHP_UPLOAD_STOPPED'),
|
||||
array(9, false),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user