summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2012-09-21 16:11:11 -0700
committerThomas Müller <thomas.mueller@tmit.eu>2012-09-21 16:11:11 -0700
commitd5055639b2d3269e02ecb378f4db6b7a6fa88473 (patch)
tree83ba69d286d6d76109f8bb3d683b3a6f433ae51c /apps
parentac69974d73abafbee638cd0f9e024ded30248845 (diff)
parent1b411df83e652a6459e712d32eb1fc1b9c1cfd1d (diff)
downloadnextcloud-server-d5055639b2d3269e02ecb378f4db6b7a6fa88473.tar.gz
nextcloud-server-d5055639b2d3269e02ecb378f4db6b7a6fa88473.zip
Merge pull request #15 from scambra/delete-fixes
use post to delete files, get has a limit and fails with many files
Diffstat (limited to 'apps')
-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(){