minor fix adding slash if not found
This commit is contained in:
parent
6713f51414
commit
1e73105fc9
|
@ -3768,14 +3768,22 @@ function ui_get_full_url($url='', $no_proxy=false, $add_name_php_file=false, $me
|
||||||
if (ui_forced_public_url()) {
|
if (ui_forced_public_url()) {
|
||||||
$proxy = true;
|
$proxy = true;
|
||||||
$fullurl = $config['public_url'];
|
$fullurl = $config['public_url'];
|
||||||
|
if (substr($fullurl, -1) != '/') {
|
||||||
|
$fullurl .= '/';
|
||||||
|
}
|
||||||
|
|
||||||
if ($url == 'index.php' && is_metaconsole()) {
|
if ($url == 'index.php' && is_metaconsole()) {
|
||||||
$fullurl .= '/'.ENTERPRISE_DIR.'/meta';
|
$fullurl .= ENTERPRISE_DIR.'/meta';
|
||||||
}
|
}
|
||||||
} else if (!empty($config['public_url'])
|
} else if (!empty($config['public_url'])
|
||||||
&& (!empty($_SERVER['HTTP_X_FORWARDED_HOST']))
|
&& (!empty($_SERVER['HTTP_X_FORWARDED_HOST']))
|
||||||
) {
|
) {
|
||||||
// Forced to use public url when being forwarder by a reverse proxy.
|
// Forced to use public url when being forwarder by a reverse proxy.
|
||||||
$fullurl = $config['public_url'];
|
$fullurl = $config['public_url'];
|
||||||
|
if (substr($fullurl, -1) != '/') {
|
||||||
|
$fullurl .= '/';
|
||||||
|
}
|
||||||
|
|
||||||
$proxy = true;
|
$proxy = true;
|
||||||
} else {
|
} else {
|
||||||
$fullurl = $protocol.'://'.$_SERVER['SERVER_NAME'];
|
$fullurl = $protocol.'://'.$_SERVER['SERVER_NAME'];
|
||||||
|
|
Loading…
Reference in New Issue