diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-09-09 10:43:12 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-09-09 10:43:12 +0200 |
commit | 70ad0c6a8f7d16b767aa78cde2acc9a3b3512e6f (patch) | |
tree | 2532298ac7bad2350af768a29d67bdc333cb2d8f | |
parent | 327e36a4d68ff9607967af52ef8f6a00c60343ff (diff) | |
download | forums-70ad0c6a8f7d16b767aa78cde2acc9a3b3512e6f.tar forums-70ad0c6a8f7d16b767aa78cde2acc9a3b3512e6f.tar.gz forums-70ad0c6a8f7d16b767aa78cde2acc9a3b3512e6f.tar.bz2 forums-70ad0c6a8f7d16b767aa78cde2acc9a3b3512e6f.tar.xz forums-70ad0c6a8f7d16b767aa78cde2acc9a3b3512e6f.zip |
[ticket/13904] Add language entries for error messages in upload class
PHPBB3-13904
-rw-r--r-- | phpBB/language/en/common.php | 2 | ||||
-rw-r--r-- | phpBB/language/en/posting.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/files/upload.php | 7 | ||||
-rw-r--r-- | tests/files/upload_test.php | 6 |
4 files changed, 9 insertions, 8 deletions
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 292d30dd1c..8e5ab53b0e 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -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.', diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index 924395ed44..0e2d706f19 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -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', diff --git a/phpBB/phpbb/files/upload.php b/phpBB/phpbb/files/upload.php index 328dd49a06..bd379924e7 100644 --- a/phpBB/phpbb/files/upload.php +++ b/phpBB/phpbb/files/upload.php @@ -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: diff --git a/tests/files/upload_test.php b/tests/files/upload_test.php index 1716eca6c9..c41204a0d5 100644 --- a/tests/files/upload_test.php +++ b/tests/files/upload_test.php @@ -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), ); } |