diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-03-07 14:15:02 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-03-07 14:15:02 +0100 |
commit | 4a4f705adc32831c4e90422598dbe0e89c6acd80 (patch) | |
tree | e3107d1554f22b878eea29005cf183e487882a1e /apps/files/ajax | |
parent | 97222b1de5349ac31abf518b7fd762b24947e237 (diff) | |
download | nextcloud-server-4a4f705adc32831c4e90422598dbe0e89c6acd80.tar.gz nextcloud-server-4a4f705adc32831c4e90422598dbe0e89c6acd80.zip |
json encode list of files
Diffstat (limited to 'apps/files/ajax')
-rw-r--r-- | apps/files/ajax/download.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files/ajax/download.php b/apps/files/ajax/download.php index b9a4ddaf5e7..163232ef001 100644 --- a/apps/files/ajax/download.php +++ b/apps/files/ajax/download.php @@ -33,4 +33,11 @@ OCP\User::checkLoggedIn(); $files = $_GET["files"]; $dir = $_GET["dir"]; -OC_Files::get($dir, $files, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); +$files_list = json_decode($files); +if ($files_list === NULL ) { + $files_list = array($files); +} + +foreach ($files_list as $f) error_log("file: $f"); + +OC_Files::get($dir, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false); |