some fixes, please hard test

This commit is contained in:
fbsanchez 2021-10-05 17:03:06 +02:00
parent ec8d5b4fe4
commit e335bb6885

View File

@ -4290,10 +4290,6 @@ function ui_get_full_url($url='', $no_proxy=false, $add_name_php_file=false, $me
if (substr($fullurl, -1) != '/') { if (substr($fullurl, -1) != '/') {
$fullurl .= '/'; $fullurl .= '/';
} }
if ($url == 'index.php' && is_metaconsole()) {
$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']))
) { ) {
@ -4332,34 +4328,18 @@ function ui_get_full_url($url='', $no_proxy=false, $add_name_php_file=false, $me
// Only add the home url. // Only add the home url.
$url = $config['homeurl_static'].'/'; $url = $config['homeurl_static'].'/';
} }
if (is_metaconsole() && $metaconsole_root) {
$url .= 'enterprise/meta/';
}
} else if (!strstr($url, '.php')) { } else if (!strstr($url, '.php')) {
if ($proxy) { if ($proxy) {
$fullurl .= '/'; $fullurl .= '/';
} else { } else {
$fullurl .= $config['homeurl_static'].'/'; $fullurl .= $config['homeurl_static'].'/';
} }
if (is_metaconsole() && $metaconsole_root) {
$fullurl .= 'enterprise/meta/';
}
} else { } else {
if ($proxy) { if ((bool) $proxy === false) {
if (is_metaconsole() && $metaconsole_root) {
$fullurl .= 'enterprise/meta/';
}
} else {
if ($add_name_php_file) { if ($add_name_php_file) {
$fullurl .= $_SERVER['SCRIPT_NAME']; $fullurl .= $_SERVER['SCRIPT_NAME'];
} else { } else {
$fullurl .= $config['homeurl_static'].'/'; $fullurl .= $config['homeurl_static'].'/';
if (is_metaconsole() && $metaconsole_root) {
$fullurl .= 'enterprise/meta/';
}
} }
} }
} }
@ -4374,6 +4354,10 @@ function ui_get_full_url($url='', $no_proxy=false, $add_name_php_file=false, $me
$url = substr($url, 1); $url = substr($url, 1);
} }
if (is_metaconsole() && $metaconsole_root) {
$fullurl .= 'enterprise/meta/';
}
return $fullurl.$url; return $fullurl.$url;
} }