From 909e505c2e24cbc06ce19e9642ce141a45e4808c Mon Sep 17 00:00:00 2001
From: Vincent Petry <pvince81@owncloud.com>
Date: Mon, 23 Jun 2014 15:57:45 +0200
Subject: [PATCH] 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.
---
 apps/files/ajax/delete.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php
index f6aa4f0c90..9f8621f604 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 ?
-- 
GitLab