]> source.dussan.org Git - nextcloud-server.git/commitdiff
use json to encode user list
authorRobin Appelman <icewind@owncloud.com>
Wed, 19 Jun 2013 13:02:18 +0000 (15:02 +0200)
committerRobin Appelman <icewind@owncloud.com>
Wed, 19 Jun 2013 13:02:18 +0000 (15:02 +0200)
apps/files/ajax/scan.php
apps/files/js/files.js

index d58fd69b9f90f0cf664d15efe16dc0c79dbc363d..0706d4e78296b0afdd677e8072cd61266bdcdfce 100644 (file)
@@ -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());
index ee0d7187cabe689e1f17c90c22b4aa0066039359..3438c1c30a131665a15fbb275bff1fc18841c161 100644 (file)
@@ -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 {