]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove warning when deleting all entries
authorVincent Petry <pvince81@owncloud.com>
Mon, 23 Jun 2014 13:57:45 +0000 (15:57 +0200)
committerVincent Petry <pvince81@owncloud.com>
Mon, 23 Jun 2014 13:57:45 +0000 (15:57 +0200)
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

index f6aa4f0c90ef77094e7611484c58d1d61d2d5df6..9f8621f604d7f393ee5688ea2bf028af786e08ab 100644 (file)
@@ -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 ?