From 9dd11091d4f9a970a3e76d77e772b5905666ed30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jes=C3=BAs=20Macias?= Date: Tue, 1 Dec 2015 17:27:06 +0100 Subject: [PATCH] Fix code from comments --- ...nnectionexception.php => storageauthexception.php} | 11 ++++------- ...figexception.php => storagebadconfigexception.php} | 9 +++------ ...utexception.php => storageconnectionexception.php} | 11 ++++------- ...eauthexception.php => storagetimeoutexception.php} | 11 ++++------- 4 files changed, 15 insertions(+), 27 deletions(-) rename lib/public/files/{extstorageconnectionexception.php => storageauthexception.php} (69%) rename lib/public/files/{extstoragebadconfigexception.php => storagebadconfigexception.php} (72%) rename lib/public/files/{extstoragetimeoutexception.php => storageconnectionexception.php} (70%) rename lib/public/files/{extstorageauthexception.php => storagetimeoutexception.php} (71%) diff --git a/lib/public/files/extstorageconnectionexception.php b/lib/public/files/storageauthexception.php similarity index 69% rename from lib/public/files/extstorageconnectionexception.php rename to lib/public/files/storageauthexception.php index 96d2551ddad..6b49065038b 100644 --- a/lib/public/files/extstorageconnectionexception.php +++ b/lib/public/files/storageauthexception.php @@ -18,19 +18,16 @@ * along with this program. If not, see * */ - -// use OCP namespace for all classes that are considered public. -// This means that they should be used by apps instead of the internal ownCloud classes namespace OCP\Files; /** - * External Storage authentication exception + * Storage authentication exception * @since 9.0.0 */ -class ExtStorageConnectionException extends StorageNotAvailableException { +class StorageAuthException extends StorageNotAvailableException { /** - * ExtStorageConnectionException constructor. + * StorageAuthException constructor. * * @param string $message * @param int $code @@ -39,6 +36,6 @@ class ExtStorageConnectionException extends StorageNotAvailableException { */ public function __construct($message = '', \Exception $previous = null) { $l = \OC::$server->getL10N('core'); - parent::__construct($l->t('External storage connection error. %s', $message), self::STATUS_NETWORK_ERROR, $previous); + parent::__construct($l->t('Storage unauthorized. %s', $message), self::STATUS_UNAUTHORIZED, $previous); } } diff --git a/lib/public/files/extstoragebadconfigexception.php b/lib/public/files/storagebadconfigexception.php similarity index 72% rename from lib/public/files/extstoragebadconfigexception.php rename to lib/public/files/storagebadconfigexception.php index beb7ff32c81..d72ad3358e5 100644 --- a/lib/public/files/extstoragebadconfigexception.php +++ b/lib/public/files/storagebadconfigexception.php @@ -18,16 +18,13 @@ * along with this program. If not, see * */ - -// use OCP namespace for all classes that are considered public. -// This means that they should be used by apps instead of the internal ownCloud classes namespace OCP\Files; /** - * External Storage has bad or missing config params + * Storage has bad or missing config params * @since 9.0.0 */ -class ExtStorageBadConfigException extends StorageNotAvailableException { +class StorageBadConfigException extends StorageNotAvailableException { /** * ExtStorageBadConfigException constructor. @@ -39,7 +36,7 @@ class ExtStorageBadConfigException extends StorageNotAvailableException { */ public function __construct($message = '', \Exception $previous = null) { $l = \OC::$server->getL10N('core'); - parent::__construct($l->t('External storage incomplete configuration. %s', $message), self::STATUS_INCOMPLETE_CONF, $previous); + parent::__construct($l->t('Storage incomplete configuration. %s', $message), self::STATUS_INCOMPLETE_CONF, $previous); } } diff --git a/lib/public/files/extstoragetimeoutexception.php b/lib/public/files/storageconnectionexception.php similarity index 70% rename from lib/public/files/extstoragetimeoutexception.php rename to lib/public/files/storageconnectionexception.php index 208f7521432..c17367046e0 100644 --- a/lib/public/files/extstoragetimeoutexception.php +++ b/lib/public/files/storageconnectionexception.php @@ -18,19 +18,16 @@ * along with this program. If not, see * */ - -// use OCP namespace for all classes that are considered public. -// This means that they should be used by apps instead of the internal ownCloud classes namespace OCP\Files; /** - * External Storage authentication exception + * Storage authentication exception * @since 9.0.0 */ -class ExtStorageTimeoutException extends StorageNotAvailableException { +class StorageConnectionException extends StorageNotAvailableException { /** - * ExtStorageTimeoutException constructor. + * StorageConnectionException constructor. * * @param string $message * @param int $code @@ -39,6 +36,6 @@ class ExtStorageTimeoutException extends StorageNotAvailableException { */ public function __construct($message = '', \Exception $previous = null) { $l = \OC::$server->getL10N('core'); - parent::__construct($l->t('External storage connection timeout. %s', $message), self::STATUS_TIMEOUT, $previous); + parent::__construct($l->t('Storage connection error. %s', $message), self::STATUS_NETWORK_ERROR, $previous); } } diff --git a/lib/public/files/extstorageauthexception.php b/lib/public/files/storagetimeoutexception.php similarity index 71% rename from lib/public/files/extstorageauthexception.php rename to lib/public/files/storagetimeoutexception.php index 7e7e6f5caa6..c6682604b6d 100644 --- a/lib/public/files/extstorageauthexception.php +++ b/lib/public/files/storagetimeoutexception.php @@ -18,19 +18,16 @@ * along with this program. If not, see * */ - -// use OCP namespace for all classes that are considered public. -// This means that they should be used by apps instead of the internal ownCloud classes namespace OCP\Files; /** - * External Storage authentication exception + * Storage authentication exception * @since 9.0.0 */ -class ExtStorageAuthException extends StorageNotAvailableException { +class StorageTimeoutException extends StorageNotAvailableException { /** - * ExtStorageAuthException constructor. + * StorageTimeoutException constructor. * * @param string $message * @param int $code @@ -39,6 +36,6 @@ class ExtStorageAuthException extends StorageNotAvailableException { */ public function __construct($message = '', \Exception $previous = null) { $l = \OC::$server->getL10N('core'); - parent::__construct($l->t('External storage unauthorized. %s', $message), self::STATUS_UNAUTHORIZED, $previous); + parent::__construct($l->t('Storage connection timeout. %s', $message), self::STATUS_TIMEOUT, $previous); } } -- 2.39.5