summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-11-07 14:05:45 +0100
committerRobin Appelman <icewind@owncloud.com>2012-11-07 14:10:06 +0100
commitbbe0cf376f450356731be46a8c22c88fa34a4fd1 (patch)
tree11ee729a0c2dce0b1ada61a8aae9bad233e742c3 /lib
parentf660247b477fe709fa108b4afb340cb07fef49e8 (diff)
downloadnextcloud-server-bbe0cf376f450356731be46a8c22c88fa34a4fd1.tar.gz
nextcloud-server-bbe0cf376f450356731be46a8c22c88fa34a4fd1.zip
fix user specific mount configuration
Diffstat (limited to 'lib')
-rw-r--r--lib/filesystem.php86
1 files changed, 43 insertions, 43 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php
index 21118169dae..f54cc6492e7 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);
+ }
}
}