[Pkg-owncloud-commits] [owncloud] 50/394: fix user specific mount configuration

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:11:25 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 bbe0cf376f450356731be46a8c22c88fa34a4fd1
Author: Robin Appelman <icewind at owncloud.com>
Date:   Wed Nov 7 14:05:45 2012 +0100

    fix user specific mount configuration
---
 lib/filesystem.php |   86 ++++++++++++++++++++++++++--------------------------
 1 file changed, 43 insertions(+), 43 deletions(-)

diff --git a/lib/filesystem.php b/lib/filesystem.php
index 2111816..f54cc64 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -202,55 +202,55 @@ class OC_Filesystem{
 		if($mountpoint) {
 			if(!isset(OC_Filesystem::$storages[$mountpoint])) {
 				$mount=OC_Filesystem::$mounts[$mountpoint];
-				OC_Filesystem::$storages[$mountpoint]=OC_Filesystem::createStorage($mount['class'],$mount['arguments']);
+				OC_Filesystem::$storages[$mountpoint]=OC_Filesystem::createStorage($mount['class'], $mount['arguments']);
 			}
 			return OC_Filesystem::$storages[$mountpoint];
 		}
 	}
 
 	static private function loadSystemMountPoints($user) {
-		if(is_file(OC::$SERVERROOT.'/config/mount.php')) {
-			$mountConfig=include(OC::$SERVERROOT.'/config/mount.php');
-			if(isset($mountConfig['global'])) {
-				foreach($mountConfig['global'] as $mountPoint=>$options) {
-					self::mount($options['class'],$options['options'],$mountPoint);
-				}
-			}
-		
-			if(isset($mountConfig['group'])) {
-				foreach($mountConfig['group'] as $group=>$mounts) {
-					if(OC_Group::inGroup($user,$group)) {
-						foreach($mounts as $mountPoint=>$options) {
-							$mountPoint=self::setUserVars($mountPoint, $user);
-							foreach($options as &$option) {
-								$option=self::setUserVars($option, $user);
-							}
-							self::mount($options['class'],$options['options'],$mountPoint);
-						}
-					}
-				}
-			}
-		
-			if(isset($mountConfig['user'])) {
-				foreach($mountConfig['user'] as $user=>$mounts) {
-					if($user==='all' or strtolower($user)===strtolower($user)) {
-						foreach($mounts as $mountPoint=>$options) {
-							$mountPoint=self::setUserVars($mountPoint, $user);
-							foreach($options as &$option) {
-								$option=self::setUserVars($option, $user);
-							}
-							self::mount($options['class'],$options['options'],$mountPoint);
-						}
-					}
-				}
-			}
-		
-			$mtime=filemtime(OC::$SERVERROOT.'/config/mount.php');
-			$previousMTime=OC_Appconfig::getValue('files','mountconfigmtime',0);
-			if($mtime>$previousMTime) {//mount config has changed, filecache needs to be updated
-				OC_FileCache::triggerUpdate();
-				OC_Appconfig::setValue('files','mountconfigmtime',$mtime);
-			}
+		if(is_file(OC::$SERVERROOT.'/config/mount.php')) {
+			$mountConfig=include OC::$SERVERROOT.'/config/mount.php';
+			if(isset($mountConfig['global'])) {
+				foreach($mountConfig['global'] as $mountPoint=>$options) {
+					self::mount($options['class'], $options['options'], $mountPoint);
+				}
+			}
+		
+			if(isset($mountConfig['group'])) {
+				foreach($mountConfig['group'] as $group=>$mounts) {
+					if(OC_Group::inGroup($user, $group)) {
+						foreach($mounts as $mountPoint=>$options) {
+							$mountPoint=self::setUserVars($mountPoint, $user);
+							foreach($options as &$option) {
+								$option=self::setUserVars($option, $user);
+							}
+							self::mount($options['class'], $options['options'], $mountPoint);
+						}
+					}
+				}
+			}
+		
+			if(isset($mountConfig['user'])) {
+				foreach($mountConfig['user'] as $mountUser=>$mounts) {
+					if($user==='all' or strtolower($mountUser)===strtolower($user)) {
+						foreach($mounts as $mountPoint=>$options) {
+							$mountPoint=self::setUserVars($mountPoint, $user);
+							foreach($options as &$option) {
+								$option=self::setUserVars($option, $user);
+							}
+							self::mount($options['class'], $options['options'], $mountPoint);
+						}
+					}
+				}
+			}
+		
+			$mtime=filemtime(OC::$SERVERROOT.'/config/mount.php');
+			$previousMTime=OC_Appconfig::getValue('files', 'mountconfigmtime', 0);
+			if($mtime>$previousMTime) {//mount config has changed, filecache needs to be updated
+				OC_FileCache::triggerUpdate();
+				OC_Appconfig::setValue('files', 'mountconfigmtime', $mtime);
+			}
 		}		
 	}
 	

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