summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/ajax/delete.php6
-rw-r--r--apps/files/js/filelist.js1
2 files changed, 4 insertions, 3 deletions
diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php
index e9bcea18932..57c8c15c197 100644
--- a/apps/files/ajax/delete.php
+++ b/apps/files/ajax/delete.php
@@ -7,15 +7,15 @@ OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
// Get data
-$dir = stripslashes($_GET["dir"]);
-$files = isset($_GET["file"]) ? stripslashes($_GET["file"]) : stripslashes($_GET["files"]);
+$dir = stripslashes($_POST["dir"]);
+$files = isset($_POST["file"]) ? stripslashes($_POST["file"]) : stripslashes($_POST["files"]);
$files = explode(';', $files);
$filesWithError = '';
$success = true;
//Now delete
foreach($files as $file) {
- if( !OC_Files::delete( $dir, $file )) {
+ if( !OC_Files::delete( $dir, $file )) {
$filesWithError .= $file . "\n";
$success = false;
}
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index bbdccb49c5f..261d0d76890 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -281,6 +281,7 @@ var FileList={
$.ajax({
url: OC.filePath('files', 'ajax', 'delete.php'),
async:!sync,
+ type:'post',
data: {dir:$('#dir').val(),files:fileNames},
complete: function(data){
boolOperationFinished(data, function(){