[Pkg-owncloud-commits] [owncloud] 120/394: add root as parameter to keep default root for non-shared folder/files

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:11:42 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 84754d3d20092ca113820b09b16000cb1088539c
Author: Björn Schießle <schiessle at owncloud.com>
Date:   Tue Nov 20 14:28:32 2012 +0100

    add root as parameter to keep default root for non-shared folder/files
---
 lib/filecache.php |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/filecache.php b/lib/filecache.php
index 5fa32fb..50990c3 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -44,7 +44,7 @@ class OC_FileCache{
 	 */
 	public static function get($path,$root=false) {
 		
-		list($path, $root) = self::getSourcePathOfSharedFile($path);
+		list($path, $root) = self::getSourcePathOfSharedFile($path, $root);
 		
 		if(OC_FileCache_Update::hasUpdated($path,$root)) {
 			if($root===false) {//filesystem hooks are only valid for the default root
@@ -281,7 +281,7 @@ class OC_FileCache{
 	 */
 	public static function getId($path,$root=false) {
 		
-		list($path, $root) = self::getSourcePathOfSharedFile($path);
+		list($path, $root) = self::getSourcePathOfSharedFile($path, $root);
 			
 		if($root===false) {
 			$root=OC_Filesystem::getRoot();
@@ -519,14 +519,12 @@ class OC_FileCache{
 	 * @param string $path
 	 * @return array with the path and the root of the give file
 	 */
-	private static function getSourcePathOfSharedFile($path) {
+	private static function getSourcePathOfSharedFile($path, $root) {
 		if ( OC_App::isEnabled('files_sharing') &&  !strncmp($path, '/Shared/', 8)) {
 			$source = OC_Files_Sharing_Util::getSourcePath(str_replace('/Shared/', '', $path));
 			$parts = explode('/', $source, 4);
 			$root =  '/'.$parts[1].'/files';
 			$path = '/'.$parts[3];
-		} else {
-			$root = false; 
 		}
 		
 		return array($path, $root);

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