From: Robin Appelman Date: Wed, 19 Jun 2013 13:02:18 +0000 (+0200) Subject: use json to encode user list X-Git-Tag: v6.0.0alpha2~608^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6778a45d45e7fe0274bc920b2a47800069da49b6;p=nextcloud-server.git use json to encode user list --- diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php index d58fd69b9f9..0706d4e7829 100644 --- a/apps/files/ajax/scan.php +++ b/apps/files/ajax/scan.php @@ -9,7 +9,7 @@ if (isset($_GET['users'])) { if ($_GET['users'] === 'all') { $users = OC_User::getUsers(); } else { - $users = explode(',', $_GET['users']); + $users = json_decode($_GET['users']); } } else { $users = array(OC_User::getUser()); diff --git a/apps/files/js/files.js b/apps/files/js/files.js index ee0d7187cab..3438c1c30a1 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -711,7 +711,7 @@ function scanFiles(force, dir, users){ if (users === 'all') { usersString = users; } else { - usersString = users.join(','); + usersString = JSON.stringify(users); } scannerEventSource = new OC.EventSource(OC.filePath('files','ajax','scan.php'),{force: force,dir: dir, users: usersString}); } else {