summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-06-23 15:57:45 +0200
committerVincent Petry <pvince81@owncloud.com>2014-06-23 15:57:45 +0200
commit909e505c2e24cbc06ce19e9642ce141a45e4808c (patch)
tree745230e42580f2d75c097d1e3c3f69fd3ec2d48d
parent8c8209828126a55b9bf775e00cbc14d7ef7db5ae (diff)
downloadnextcloud-server-909e505c2e24cbc06ce19e9642ce141a45e4808c.tar.gz
nextcloud-server-909e505c2e24cbc06ce19e9642ce141a45e4808c.zip
Remove warning when deleting all entries
When deleting all entries, only "allfiles" is defined but not "file" or "files", which caused a PHP warning to be logged.
-rw-r--r--apps/files/ajax/delete.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php
index f6aa4f0c90e..9f8621f604d 100644
--- a/apps/files/ajax/delete.php
+++ b/apps/files/ajax/delete.php
@@ -7,10 +7,11 @@ OCP\JSON::callCheck();
// Get data
$dir = stripslashes($_POST["dir"]);
-$files = isset($_POST["file"]) ? $_POST["file"] : $_POST["files"];
$allFiles = isset($_POST["allfiles"]) ? $_POST["allfiles"] : false;
if ($allFiles === 'true') {
$allFiles = true;
+} else {
+ $files = isset($_POST["file"]) ? $_POST["file"] : $_POST["files"];
}
// delete all files in dir ?