summaryrefslogtreecommitdiffstats
path: root/apps/files/ajax
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-03-07 14:15:02 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-03-07 14:15:02 +0100
commit4a4f705adc32831c4e90422598dbe0e89c6acd80 (patch)
treee3107d1554f22b878eea29005cf183e487882a1e /apps/files/ajax
parent97222b1de5349ac31abf518b7fd762b24947e237 (diff)
downloadnextcloud-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.php9
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);