diff options
author | Andrew Dolgov <[email protected]> | 2016-08-19 18:14:22 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2016-08-19 18:14:22 +0300 |
commit | 1a322ff3dfb47a73f52f4076b9d73601999c573e (patch) | |
tree | 6f09c810bc29ad432ac934a7d21c8538650e6f66 /include | |
parent | a84fb943b4c5a030e215fa819e579ca4646cf617 (diff) |
import_export: better error message if upload failed
Diffstat (limited to 'include')
-rw-r--r-- | include/functions2.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/functions2.php b/include/functions2.php index dceea507e..7e1171b7d 100644 --- a/include/functions2.php +++ b/include/functions2.php @@ -2449,4 +2449,20 @@ return $tmp; } + + function get_upload_error_message($code) { + + $errors = array( + 0 => __('There is no error, the file uploaded with success'), + 1 => __('The uploaded file exceeds the upload_max_filesize directive in php.ini'), + 2 => __('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'), + 3 => __('The uploaded file was only partially uploaded'), + 4 => __('No file was uploaded'), + 6 => __('Missing a temporary folder'), + 7 => __('Failed to write file to disk.'), + 8 => __('A PHP extension stopped the file upload.'), + ); + + return $errors[$code]; + } ?> |