diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index e2198655c9..1414f0fd1a 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -727,6 +727,15 @@ $lang = array_merge($lang, array( 'SUBJECT' => 'Subject', 'SUBMIT' => 'Submit', + 'STORAGE_FILE_EXISTS' => 'File already exists.', + 'STORAGE_FILE_NO_EXIST' => 'File does not exist.', + 'STORAGE_CANNOT_WRITE_FILE' => 'Can not write to file.', + 'STORAGE_CANNOT_READ_FILE' => 'Can not read file.', + 'STORAGE_CANNOT_DELETE' => 'Can not delete file or folder.', + 'STORAGE_CANNOT_RENAME' => 'Can not rename file or folder.', + 'STORAGE_CANNOT_COPY' => 'Can not copy file or folder.', + 'STORAGE_CANNOT_CREATE_DIR' => 'Can not create directory.', + 'TB' => 'TB', 'TERMS_USE' => 'Terms of use', 'TEST_CONNECTION' => 'Test connection', diff --git a/phpBB/phpbb/storage/adapter/local.php b/phpBB/phpbb/storage/adapter/local.php index 5d0651c466..68b9ce0c2c 100644 --- a/phpBB/phpbb/storage/adapter/local.php +++ b/phpBB/phpbb/storage/adapter/local.php @@ -54,7 +54,7 @@ class local implements adapter_interface { if ($this->exists($path)) { - throw new exception('', $path); // FILE_EXISTS + throw new exception('STORAGE_FILE_EXISTS', $path); } try @@ -63,7 +63,7 @@ class local implements adapter_interface } catch (filesystem_exception $e) { - throw new exception('', $path, array(), $e); // CANNOT_DUMP_FILE + throw new exception('STORAGE_CANNOT_WRITE_FILE', $path, array(), $e); } } @@ -74,14 +74,14 @@ class local implements adapter_interface { if (!$this->exists($path)) { - throw new exception('', $path); // FILE_DONT_EXIST + throw new exception('STORAGE_FILE_NO_EXIST', $path); } $content = @file_get_contents($this->root_path . $path); if ($content === false) { - throw new exception('', $path); // CANNOT READ FILE + throw new exception('STORAGE_CANNOT_READ_FILE', $path); } return $content; @@ -106,7 +106,7 @@ class local implements adapter_interface } catch (filesystem_exception $e) { - throw new exception('', $path, array(), $e); // CANNOT DELETE + throw new exception('STORAGE_CANNOT_DELETE', $path, array(), $e); } } @@ -121,7 +121,7 @@ class local implements adapter_interface } catch (filesystem_exception $e) { - throw new exception('', $path_orig, array(), $e); // CANNOT_RENAME + throw new exception('STORAGE_CANNOT_RENAME', $path_orig, array(), $e); } } @@ -136,7 +136,7 @@ class local implements adapter_interface } catch (filesystem_exception $e) { - throw new exception('', '', array(), $e); // CANNOT_COPY_FILES + throw new exception('STORAGE_CANNOT_COPY', $path_orig, array(), $e); } } @@ -151,7 +151,7 @@ class local implements adapter_interface } catch (filesystem_exception $e) { - throw new exception('', $path, array(), $e); // CANNOT_CREATE_DIRECTORY + throw new exception('STORAGE_CANNOT_CREATE_DIR', $path, array(), $e); } }