forked from extern/egroupware
Fix url for external links
This commit is contained in:
parent
1c6649a929
commit
2a24a4a53e
@ -136,7 +136,19 @@ class filemanager_merge extends bo_merge
|
||||
}
|
||||
*/
|
||||
$link = egw_link::mime_open($file['url'], $file['mime']);
|
||||
// Prepend site
|
||||
if(is_array($link))
|
||||
{
|
||||
// Directories have their internal protocol in path here
|
||||
if($link['path'] && strpos($link['path'], '://') !== false) $link['path'] = $file['path'];
|
||||
$link = egw_session::link('/index.php', $link);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Regular files
|
||||
$link = egw_session::link($link);
|
||||
}
|
||||
|
||||
// Prepend site, if missing
|
||||
if ($link{0} == '/')
|
||||
{
|
||||
$link = ($_SERVER['HTTPS'] || $GLOBALS['egw_info']['server']['enforce_ssl'] ? 'https://' : 'http://').
|
||||
|
Loading…
Reference in New Issue
Block a user