From 08aca8ff512c69059336f0b3e55cc75143bd97af Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 15 Nov 2011 06:56:32 +0000 Subject: [PATCH] allow to use LDAP homeDirectory attribute as $home in mount-url --- phpgwapi/inc/class.vfs_stream_wrapper.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.vfs_stream_wrapper.inc.php b/phpgwapi/inc/class.vfs_stream_wrapper.inc.php index 742f9631ab..3231c5001f 100644 --- a/phpgwapi/inc/class.vfs_stream_wrapper.inc.php +++ b/phpgwapi/inc/class.vfs_stream_wrapper.inc.php @@ -194,6 +194,7 @@ class vfs_stream_wrapper implements iface_stream_wrapper 'user' => $GLOBALS['egw_info']['user']['account_lid'], 'pass' => $GLOBALS['egw_info']['user']['passwd'], 'host' => $GLOBALS['egw_info']['user']['domain'], + 'home' => $GLOBALS['egw_info']['user']['homedirectory'], ); } $parts = array_merge(parse_url($path),$defaults); @@ -219,7 +220,7 @@ class vfs_stream_wrapper implements iface_stream_wrapper if ($replace_user_pass_host) { - $url = str_replace(array('$user','$pass','$host'),array($parts['user'],$parts['pass'],$parts['host']),$url); + $url = str_replace(array('$user','$pass','$host','$home'),array($parts['user'],$parts['pass'],$parts['host'],$parts['home']),$url); } if ($parts['query']) $url .= '?'.$parts['query']; if ($parts['fragment']) $url .= '#'.$parts['fragment'];