[Pkg-owncloud-commits] [owncloud] 27/67: Merge if statements
David Prévot
taffit at moszumanska.debian.org
Fri Jun 27 23:58:14 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit c98b7fe7fceeb90f3fc25bc1a27c7e22341b5e4a
Author: Joas Schilling <nickvergessen at gmx.de>
Date: Mon Jun 23 18:10:08 2014 +0200
Merge if statements
---
apps/files/ajax/delete.php | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php
index 9f8621f..a28b7b7 100644
--- a/apps/files/ajax/delete.php
+++ b/apps/files/ajax/delete.php
@@ -8,20 +8,16 @@ OCP\JSON::callCheck();
// Get data
$dir = stripslashes($_POST["dir"]);
$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 ?
-if ($allFiles) {
+if ($allFiles === 'true') {
$files = array();
$fileList = \OC\Files\Filesystem::getDirectoryContent($dir);
foreach ($fileList as $fileInfo) {
$files[] = $fileInfo['name'];
}
} else {
+ $files = isset($_POST["file"]) ? $_POST["file"] : $_POST["files"];
$files = json_decode($files);
}
$filesWithError = '';
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list