[Pkg-owncloud-commits] [owncloud] 53/394: make root the default parameter for getAbsolutePath()

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:11:26 UTC 2013


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

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit a25cf8ba832606d45658e9d7da0bf0c1cb219374
Author: Björn Schießle <schiessle at owncloud.com>
Date:   Wed Nov 7 16:39:56 2012 +0100

    make root the default parameter for getAbsolutePath()
---
 lib/filesystem.php     |    2 +-
 lib/filesystemview.php |    5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/lib/filesystem.php b/lib/filesystem.php
index 172cc35..f54cc64 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -562,7 +562,7 @@ class OC_Filesystem{
 		if ($root) { // reduce path to the required part of it (no 'username/files')
 			$fakeRootView = new OC_FilesystemView($root);
 			$count = 1;
-			$path=str_replace(OC_App::getStorage("files")->getAbsolutePath(''), "", $fakeRootView->getAbsolutePath($path), $count);
+			$path=str_replace(OC_App::getStorage("files")->getAbsolutePath(), "", $fakeRootView->getAbsolutePath($path), $count);
 		}
 
 		$path = self::normalizePath($path);
diff --git a/lib/filesystemview.php b/lib/filesystemview.php
index 776c859..d34fbf8 100644
--- a/lib/filesystemview.php
+++ b/lib/filesystemview.php
@@ -47,10 +47,7 @@ class OC_FilesystemView {
 		$this->fakeRoot=$root;
 	}
 
-	public function getAbsolutePath($path) {
-		if(!$path) {
-			$path='/';
-		}
+	public function getAbsolutePath($path = '/') {
 		if($path[0]!=='/') {
 			$path='/'.$path;
 		}

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