diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-06-20 12:58:04 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-06-20 12:58:04 +0200 |
commit | 502573eb2ec6b8221a2e902e54ef0aeec26be8f0 (patch) | |
tree | dacf8642f99b65716de2dfd21234eb14079d14bb /apps/files/js | |
parent | ca96b9d3d5197da9d2686c8fe8e0cdcc2fbfa800 (diff) | |
download | nextcloud-server-502573eb2ec6b8221a2e902e54ef0aeec26be8f0.tar.gz nextcloud-server-502573eb2ec6b8221a2e902e54ef0aeec26be8f0.zip |
Fixed file actions fallback
Some apps are calling FileActions.display() directly but omit the new
fileList argument.
This fix makes the fileList argument correctly fall back to the default
file list (the one from the "All files" section)
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/fileactions.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index de02bf5e730..5bd75ac6287 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -133,6 +133,8 @@ display: function (parent, triggerEvent, fileList) { if (!fileList) { console.warn('FileActions.display() MUST be called with a OCA.Files.FileList instance'); + // using default list instead, which could be wrong + fileList = OCA.Files.App.fileList; } this.currentFile = parent; var self = this; @@ -162,7 +164,7 @@ event.data.actionFunc(file, { $file: $tr, - fileList: fileList || OCA.Files.App.fileList, + fileList: fileList, fileActions: self, dir: $tr.attr('data-path') || fileList.getCurrentDirectory() }); |