From 4a4f705adc32831c4e90422598dbe0e89c6acd80 Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Thu, 7 Mar 2013 14:15:02 +0100 Subject: json encode list of files --- apps/files/ajax/download.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apps/files/ajax/download.php') 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); -- cgit v1.2.3