summaryrefslogtreecommitdiffstats
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
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
-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(){
class="p">{ "translations": { "Edit comment" : "Upraviť komentár", "Delete comment" : "Zmazať komentár", "New comment …" : "Nový komentár ...", "Post" : "Odoslať", "Cancel" : "Zrušiť", "[Deleted user]" : "[Zmazaný užívateľ]", "Comments" : "Komentáre", "No comments yet, start the conversation!" : "Žiadne komentáre, začnite konverzáciu!", "More comments …" : "Ďalšie komentáre ...", "Save" : "Uložiť", "Allowed characters {count} of {max}" : "Počet povolených znakov {count} z {max}", "Error occurred while retrieving comment with ID {id}" : "Pri načítavaní komentára s id {id} nastala chyba", "Error occurred while updating comment with id {id}" : "Pri aktualizovaní komentára s id {id} nastala chyba", "Error occurred while posting comment" : "Pri odosielaní komentára nastala chyba", "_%n unread comment_::_%n unread comments_" : ["%n neprečítaný komentár","%n neprečítaných komentárov","%n neprečítaných komentárov","%n neprečítaných komentárov"], "Comment" : "Komentár", "You commented" : "Komentovali ste", "%1$s commented" : "%1$s komentoval", "{author} commented" : "{author} komentoval", "You commented on %1$s" : "Komentovali ste %1$s", "You commented on {file}" : "Komentovali ste {file}", "%1$s commented on %2$s" : "%1$s komentoval %2$s", "{author} commented on {file}" : "{author} komentoval {file}", "<strong>Comments</strong> for files" : "<strong>Komentáre</strong> pre súbory", "You were mentioned on “{file}”, in a comment by a user that has since been deleted" : "Boli ste spomenutý v \"{file}\", v komentári používateľom ktorý bol už vymazaný", "{user} mentioned you in a comment on “{file}”" : "{user} vás spomenul v komentári k “{file}”", "Files app plugin to add comments to files" : "Plugin súborovej aplikácie ktorý umožňuje pridávať komentáre k súborom", "You were mentioned on “%s”, in a comment by a user that has since been deleted" : "Boli ste spomenutý v \"%s\", v komentári používateľom ktorý bol už vymazaný", "%1$s mentioned you in a comment on “%2$s”" : "%1$s vás spomenul v komentári k \"%2$s\"" },"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);" }