Fix error message while restoring all files

* use $_POST['files'] only of ssinlge files are restored
* fixes #528
This commit is contained in:
Morris Jobke 2016-07-25 09:24:32 +02:00
parent de4236bc4a
commit 59b87fade5
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 1 additions and 2 deletions

View File

@ -29,7 +29,6 @@ OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck(); OCP\JSON::callCheck();
\OC::$server->getSession()->close(); \OC::$server->getSession()->close();
$files = $_POST['files'];
$dir = '/'; $dir = '/';
if (isset($_POST['dir'])) { if (isset($_POST['dir'])) {
$dir = rtrim((string)$_POST['dir'], '/'). '/'; $dir = rtrim((string)$_POST['dir'], '/'). '/';
@ -50,7 +49,7 @@ if (isset($_POST['allfiles']) && (string)$_POST['allfiles'] === 'true') {
$list[] = $fileName; $list[] = $fileName;
} }
} else { } else {
$list = json_decode($files); $list = json_decode($_POST['files']);
} }
$error = array(); $error = array();