]> source.dussan.org Git - nextcloud-server.git/commitdiff
use json encoding when deleting multiply files instead of using ; as delimiter
authorRobin Appelman <icewind@owncloud.com>
Thu, 13 Dec 2012 17:11:00 +0000 (18:11 +0100)
committerRobin Appelman <icewind@owncloud.com>
Thu, 13 Dec 2012 17:11:00 +0000 (18:11 +0100)
apps/files/ajax/delete.php
apps/files/js/filelist.js

index 57c8c15c1976d82124db8acff1a8109b18fbec23..6532b76df210940a94554db44bd50ac9e884d781 100644 (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
index 9f0bafafbdf6d5b6b75d71babc3e6bc3e11ec3f5..3fbafd722b500a4752a4b3fcb25b5eeb5c37d6b1 100644 (file)
@@ -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,