aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-10-25 13:19:46 +0200
committerGitHub <noreply@github.com>2016-10-25 13:19:46 +0200
commitc0adc3c2cf2b2b6568dd5c16e9b3b286d4933ee9 (patch)
tree7683dcc2de51dbf8b55bf4673b0a7f5cc86ee339 /apps/files
parent324e5b02ba7ee0610f4de5e708987d7907bb1db5 (diff)
parent44cf67accdc294f46bf82b3f8661f353dc5e22f0 (diff)
downloadnextcloud-server-c0adc3c2cf2b2b6568dd5c16e9b3b286d4933ee9.tar.gz
nextcloud-server-c0adc3c2cf2b2b6568dd5c16e9b3b286d4933ee9.zip
Merge pull request #1883 from nextcloud/downstream-26145
Storage 503 message improvements
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/ajax/list.php10
-rw-r--r--apps/files/js/filelist.js2
-rw-r--r--apps/files/tests/js/filelistSpec.js2
3 files changed, 7 insertions, 7 deletions
diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php
index bb95f124dab..2cd09765435 100644
--- a/apps/files/ajax/list.php
+++ b/apps/files/ajax/list.php
@@ -79,12 +79,12 @@ try {
OCP\JSON::success(array('data' => $data));
} catch (\OCP\Files\StorageNotAvailableException $e) {
\OCP\Util::logException('files', $e);
- OCP\JSON::error(array(
- 'data' => array(
+ OCP\JSON::error([
+ 'data' => [
'exception' => '\OCP\Files\StorageNotAvailableException',
- 'message' => $l->t('Storage not available')
- )
- ));
+ 'message' => $l->t('Storage is temporarily not available')
+ ]
+ ]);
} catch (\OCP\Files\StorageInvalidException $e) {
\OCP\Util::logException('files', $e);
OCP\JSON::error(array(
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index e728a816cc0..bf4fd75d4cc 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1625,7 +1625,7 @@
this.changeDirectory('/');
// TODO: read error message from exception
OC.Notification.showTemporary(
- t('files', 'Storage not available')
+ t('files', 'Storage is temporarily not available')
);
}
return false;
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index 1c73bc845c5..3b0e0b83b82 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -2836,7 +2836,7 @@ describe('OCA.Files.FileList tests', function() {
});
it('redirects to root folder and shows notification in case of storage not available', function () {
expect(notificationStub.notCalled).toEqual(true);
- deferredList.reject(503, 'Storage not available');
+ deferredList.reject(503, 'Storage is temporarily not available');
expect(fileList.getCurrentDirectory()).toEqual('/');
expect(getFolderContentsStub.calledTwice).toEqual(true);