diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-08 15:21:07 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-08 15:21:07 +0100 |
commit | acc7d63a696b52bb1c3cc4857677a3df9881ec3c (patch) | |
tree | 87962982fb92a9bffc7b94c0a71550fae7f70fe7 /lib | |
parent | cf1f92cc12ff8d38c4801d122adc83304cd95e44 (diff) | |
parent | b95e38852676580a93c2e538b303271905d037d3 (diff) | |
download | nextcloud-server-acc7d63a696b52bb1c3cc4857677a3df9881ec3c.tar.gz nextcloud-server-acc7d63a696b52bb1c3cc4857677a3df9881ec3c.zip |
Merge pull request #22164 from owncloud/files_external-verify
Add occ command to verify storage configurations
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/files/storagenotavailableexception.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/public/files/storagenotavailableexception.php b/lib/public/files/storagenotavailableexception.php index f9ac79d66ec..dd3915a2f6a 100644 --- a/lib/public/files/storagenotavailableexception.php +++ b/lib/public/files/storagenotavailableexception.php @@ -58,4 +58,30 @@ class StorageNotAvailableException extends HintException { $l = \OC::$server->getL10N('core'); parent::__construct($message, $l->t('Storage not available'), $code, $previous); } + + /** + * Get the name for a status code + * + * @param int $code + * @return string + * @since 9.0.0 + */ + public static function getStateCodeName($code) { + switch ($code) { + case self::STATUS_SUCCESS: + return 'ok'; + case self::STATUS_ERROR: + return 'error'; + case self::STATUS_INDETERMINATE: + return 'indeterminate'; + case self::STATUS_UNAUTHORIZED: + return 'unauthorized'; + case self::STATUS_TIMEOUT: + return 'timeout'; + case self::STATUS_NETWORK_ERROR: + return 'network error'; + default: + return 'unknown'; + } + } } |