[Pkg-owncloud-commits] [owncloud] 04/49: check explicitely all possible dir values

David Prévot taffit at moszumanska.debian.org
Thu Dec 5 16:02:52 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 2d1129012143ea54dd54f1f30a1a830aaad30ded
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Mon Dec 2 12:13:32 2013 +0100

    check explicitely all possible dir values
---
 apps/files_trashbin/ajax/delete.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php
index 7b41eb1..75d4817 100644
--- a/apps/files_trashbin/ajax/delete.php
+++ b/apps/files_trashbin/ajax/delete.php
@@ -7,11 +7,12 @@ OCP\JSON::callCheck();
 if (isset($_POST['allfiles']) and $_POST['allfiles'] === 'true'){
 	$deleteAll = true;
 	$folder = isset($_POST['dir']) ? $_POST['dir'] : '/';
-	if ($folder === '/') {
+	if ($folder === '/' || $folder === '') {
 		OCA\Files_Trashbin\Trashbin::deleteAll();
 		$list = array();
 	} else {
-		if ( strlen(dirname($folder)) > 1 ) {
+		$dirname = dirname($folder);
+		if ( $dirname !== '/' && $dirname !== '.' ) {
 			$dirlisting = '1';
 		} else {
 			$dirlisting = '0';

-- 
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