From 4f99dcf699924d40431cad8f27f082861088f738 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 19 Jun 2013 15:02:18 +0200 Subject: [PATCH] use json to encode user list --- apps/files/ajax/scan.php | 2 +- apps/files/js/files.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 27e36eda3b8..5cb2d67500e 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -813,7 +813,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 { -- 2.39.5