allow to use LDAP homeDirectory attribute as $home in mount-url

This commit is contained in:
Ralf Becker 2011-11-15 06:57:14 +00:00
parent e88c042901
commit 5367b5a273

View File

@ -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'];