Skip to content
Snippets Groups Projects
Commit 6a2b41e5 authored by Robin Appelman's avatar Robin Appelman
Browse files

use json encoding when deleting multiply files instead of using ; as delimiter

parent 77c16b29
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ OCP\JSON::callCheck();
$dir = stripslashes($_POST["dir"]);
$files = isset($_POST["file"]) ? stripslashes($_POST["file"]) : stripslashes($_POST["files"]);
$files = explode(';', $files);
$files = json_decode($files);
$filesWithError = '';
$success = true;
//Now delete
......
......@@ -289,6 +289,7 @@ var FileList={
finishDelete:function(ready,sync){
if(!FileList.deleteCanceled && FileList.deleteFiles){
var fileNames=FileList.deleteFiles.join(';');
var fileNames=JSON.stringify(FileList.deleteFiles);
$.ajax({
url: OC.filePath('files', 'ajax', 'delete.php'),
async:!sync,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment