Merge pull request #875 from owncloud/multiplefiles_json

use json when deleting multiply files instead of using ; as delimiter
This commit is contained in:
Bart Visscher 2012-12-14 16:26:09 -08:00
commit 6ff38624a7
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -288,7 +288,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,