summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/ajax
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-12-02 11:59:09 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-12-02 11:59:09 +0100
commitedc4447d6a285d778ae2ff242877fc98fdcaa2ba (patch)
treeef2add4b8e2a967cd45907d18f1b471b9828de41 /apps/files_trashbin/ajax
parent8ce3ea3e2c0fba2073cc9f279ab14f9d2bdbfdc4 (diff)
downloadnextcloud-server-edc4447d6a285d778ae2ff242877fc98fdcaa2ba.tar.gz
nextcloud-server-edc4447d6a285d778ae2ff242877fc98fdcaa2ba.zip
set delete all to true if a complete folder was deleted
Diffstat (limited to 'apps/files_trashbin/ajax')
-rw-r--r--apps/files_trashbin/ajax/delete.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php
index 7b1949e3154..7b41eb1ea80 100644
--- a/apps/files_trashbin/ajax/delete.php
+++ b/apps/files_trashbin/ajax/delete.php
@@ -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);