]> source.dussan.org Git - nextcloud-server.git/commitdiff
set delete all to true if a complete folder was deleted
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 2 Dec 2013 10:59:09 +0000 (11:59 +0100)
committerBjoern Schiessle <schiessle@owncloud.com>
Mon, 2 Dec 2013 10:59:09 +0000 (11:59 +0100)
apps/files_trashbin/ajax/delete.php

index 7b1949e31541345d45b0507b1f2f31a6d34bfabb..7b41eb1ea8051a9fdcf39ae39deca39c419a1490 100644 (file)
@@ -4,8 +4,8 @@ OCP\JSON::checkLoggedIn();
 OCP\JSON::callCheck();
 
 // "empty trash" command
-$deleteAll = false;
 if (isset($_POST['allfiles']) and $_POST['allfiles'] === 'true'){
+       $deleteAll = true;
        $folder = isset($_POST['dir']) ? $_POST['dir'] : '/';
        if ($folder === '/') {
                OCA\Files_Trashbin\Trashbin::deleteAll();
@@ -20,6 +20,7 @@ if (isset($_POST['allfiles']) and $_POST['allfiles'] === 'true'){
        }
 }
 else {
+       $deleteAll = false;
        $files = $_POST['files'];
        $dirlisting = $_POST['dirlisting'];
        $list = json_decode($files);