diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-29 11:25:52 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-29 11:25:52 +0100 |
commit | 911613f7114c3f2c95b364b8b3d21ced5ee96283 (patch) | |
tree | 289c9a487c85c7875660d936fab64bfe863b41d7 /apps/files_external/lib | |
parent | c7f409713e8e2d44bc83c0e811bc5b2b46649080 (diff) | |
parent | 9a4d37f626dca4663ea7d25f78f7c1f174306ab5 (diff) | |
download | nextcloud-server-911613f7114c3f2c95b364b8b3d21ced5ee96283.tar.gz nextcloud-server-911613f7114c3f2c95b364b8b3d21ced5ee96283.zip |
Merge pull request #19100 from owncloud/ext-tooltip-unavailable
Display external storage status as tooltip
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/config.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/storageconfig.php | 25 |
2 files changed, 24 insertions, 2 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index d9fdb748fcd..56a7e547ec6 100644 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -269,6 +269,7 @@ class OC_Mount_Config { } } catch (Exception $exception) { \OCP\Util::logException('files_external', $exception); + throw $e; } } return self::STATUS_ERROR; diff --git a/apps/files_external/lib/storageconfig.php b/apps/files_external/lib/storageconfig.php index 70aaa186783..86a7e6ffa12 100644 --- a/apps/files_external/lib/storageconfig.php +++ b/apps/files_external/lib/storageconfig.php @@ -73,6 +73,13 @@ class StorageConfig implements \JsonSerializable { private $status; /** + * Status message + * + * @var string + */ + private $statusMessage; + + /** * Priority * * @var int @@ -295,7 +302,7 @@ class StorageConfig implements \JsonSerializable { } /** - * Sets the storage status, whether the config worked last time + * Gets the storage status, whether the config worked last time * * @return int $status status */ @@ -304,12 +311,23 @@ class StorageConfig implements \JsonSerializable { } /** + * Gets the message describing the storage status + * + * @return string|null + */ + public function getStatusMessage() { + return $this->statusMessage; + } + + /** * Sets the storage status, whether the config worked last time * * @param int $status status + * @param string|null $message optional message */ - public function setStatus($status) { + public function setStatus($status, $message = null) { $this->status = $status; + $this->statusMessage = $message; } /** @@ -341,6 +359,9 @@ class StorageConfig implements \JsonSerializable { if (!is_null($this->status)) { $result['status'] = $this->status; } + if (!is_null($this->statusMessage)) { + $result['statusMessage'] = $this->statusMessage; + } return $result; } } |