summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-29 09:21:30 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-29 09:21:30 +0100
commit5bf476efd07d8f6b771f3cbf8ff10e617536263b (patch)
tree3210352179a3837a700a7389de2d1f81835f702c /apps
parent527ef76dd6e45c2776edbc90829323e0ca534214 (diff)
parentf24386c4913c9e108bdfb8bee15190eaf3e61cab (diff)
downloadnextcloud-server-5bf476efd07d8f6b771f3cbf8ff10e617536263b.tar.gz
nextcloud-server-5bf476efd07d8f6b771f3cbf8ff10e617536263b.zip
Merge pull request #20079 from owncloud/filelist-invalidpath
Fix file list reload callback result
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/favoritesfilelist.js9
-rw-r--r--apps/files_external/js/mountsfilelist.js9
-rw-r--r--apps/files_sharing/js/sharedfilelist.js8
3 files changed, 16 insertions, 10 deletions
diff --git a/apps/files/js/favoritesfilelist.js b/apps/files/js/favoritesfilelist.js
index 4e7db9f17ba..e6532ab188c 100644
--- a/apps/files/js/favoritesfilelist.js
+++ b/apps/files/js/favoritesfilelist.js
@@ -71,6 +71,10 @@ $(document).ready(function() {
if (this._reloadCall) {
this._reloadCall.abort();
}
+
+ // there is only root
+ this._setCurrentDir('/', false);
+
this._reloadCall = $.ajax({
url: OC.generateUrl('/apps/files/api/v1/tags/{tagName}/files', {tagName: tagName}),
type: 'GET',
@@ -86,10 +90,9 @@ $(document).ready(function() {
if (result.files) {
this.setFiles(result.files.sort(this._sortComparator));
+ return true;
}
- else {
- // TODO: error handling
- }
+ return false;
}
});
diff --git a/apps/files_external/js/mountsfilelist.js b/apps/files_external/js/mountsfilelist.js
index c45faafd9bf..35aef751fef 100644
--- a/apps/files_external/js/mountsfilelist.js
+++ b/apps/files_external/js/mountsfilelist.js
@@ -86,6 +86,10 @@
if (this._reloadCall) {
this._reloadCall.abort();
}
+
+ // there is only root
+ this._setCurrentDir('/', false);
+
this._reloadCall = $.ajax({
url: OC.linkToOCS('apps/files_external/api/v1') + 'mounts',
data: {
@@ -106,10 +110,9 @@
if (result.ocs && result.ocs.data) {
this.setFiles(this._makeFiles(result.ocs.data));
+ return true;
}
- else {
- // TODO: error handling
- }
+ return false;
},
/**
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index 2e798a92578..edf138b97ae 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -123,6 +123,9 @@
this._reloadCall.abort();
}
+ // there is only root
+ this._setCurrentDir('/', false);
+
var promises = [];
var shares = $.ajax({
url: OC.linkToOCS('apps/files_sharing/api/v1') + 'shares',
@@ -173,17 +176,14 @@
if (shares[0].ocs && shares[0].ocs.data) {
files = files.concat(this._makeFilesFromShares(shares[0].ocs.data));
- } else {
- // TODO: error handling
}
if (remoteShares && remoteShares[0].ocs && remoteShares[0].ocs.data) {
files = files.concat(this._makeFilesFromRemoteShares(remoteShares[0].ocs.data));
- } else {
- // TODO: error handling
}
this.setFiles(files);
+ return true;
},
_makeFilesFromRemoteShares: function(data) {