mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 03:13:40 +01:00
* Filemanager: fix not working variables eg. $user in GUI mount (Admin > Filemanager)
also support no user/password for sharing links
This commit is contained in:
parent
f21127df8f
commit
d04b98e64c
@ -86,10 +86,10 @@ class Base
|
||||
if ($check_url === true || !isset($check_url) && strpos($url, '$') === false)
|
||||
{
|
||||
$check_url = strtr($url, [
|
||||
'user' => $GLOBALS['egw_info']['user']['account_lid'],
|
||||
'pass' => urlencode($GLOBALS['egw_info']['user']['passwd']),
|
||||
'host' => $GLOBALS['egw_info']['user']['domain'],
|
||||
'home' => str_replace(array('\\\\', '\\'), array('', '/'), $GLOBALS['egw_info']['user']['homedirectory']),
|
||||
'$user' => $GLOBALS['egw_info']['user']['account_lid'],
|
||||
'$pass' => urlencode($GLOBALS['egw_info']['user']['passwd']),
|
||||
'$host' => $GLOBALS['egw_info']['user']['domain'],
|
||||
'$home' => str_replace(array('\\\\', '\\'), array('', '/'), $GLOBALS['egw_info']['user']['homedirectory']),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -154,9 +154,9 @@ class filemanager_admin extends filemanager_ui
|
||||
throw new Api\Exception\NoPermission();
|
||||
}
|
||||
$url = $content['mounts']['url']['scheme'] . '://';
|
||||
if (in_array($content['mounts']['url']['scheme'], ['smb', 'webdavs', 'vfs']))
|
||||
if (in_array($content['mounts']['url']['scheme'], ['smb', 'vfs']) || !empty(trim($content['mounts']['url']['user'])))
|
||||
{
|
||||
if (empty(trim($content['mounts']['url']['user'])))
|
||||
if (in_array($content['mounts']['url']['scheme'], ['smb', 'vfs']) && empty(trim($content['mounts']['url']['user'])))
|
||||
{
|
||||
throw new Api\Exception\WrongUserinput(lang('SMB, WebDAVs and VFS require a username!'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user