fix check install meta

This commit is contained in:
Daniel Barbero Martin 2020-11-27 13:21:14 +01:00
parent 935ce27a30
commit b9c2db9825
2 changed files with 51 additions and 12 deletions

View File

@ -165,11 +165,31 @@ echo '<div class="container_login">';
echo '<div class="login_page">';
echo '<form method="post" action="'.ui_get_full_url('index.php'.$url).'" ><div class="login_logo_icon">';
echo '<a href="'.$logo_link.'">';
if (defined('METACONSOLE')) {
if (is_metaconsole() === true) {
if (!isset($config['custom_logo_login'])) {
html_print_image(ui_get_full_url('images/custom_logo_login/login_logo.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
html_print_image(
'enterprise/images/custom_logo_login/login_logo.png',
false,
[
'class' => 'login_logo',
'alt' => 'logo',
'border' => 0,
'title' => $logo_title,
],
false
);
} else {
html_print_image(ui_get_full_url('images/custom_logo_login/'.$config['custom_logo_login']), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
html_print_image(
'enterprise/images/custom_logo_login/'.$config['custom_logo_login'],
false,
[
'class' => 'login_logo',
'alt' => 'logo',
'border' => 0,
'title' => $logo_title,
],
false
);
}
} else if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (!isset($config['custom_logo_login'])) {
@ -350,9 +370,27 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
echo '<div class ="img_banner_login">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (isset($config['custom_splash_login'])) {
html_print_image('enterprise/images/custom_splash_login/'.$config['custom_splash_login'], false, [ 'alt' => 'splash', 'border' => 0], false, true);
html_print_image(
'enterprise/images/custom_splash_login/'.$config['custom_splash_login'],
false,
[
'alt' => 'splash',
'border' => 0,
],
false,
false
);
} else {
html_print_image('enterprise/images/custom_splash_login/splash_image_default.png', false, ['alt' => 'logo', 'border' => 0], false, true);
html_print_image(
'enterprise/images/custom_splash_login/splash_image_default.png',
false,
[
'alt' => 'logo',
'border' => 0,
],
false,
false
);
}
} else {
html_print_image('images/splash_image_default.png', false, ['alt' => 'logo', 'border' => 0], false, true);

View File

@ -1473,15 +1473,16 @@ function ui_require_css_file($name, $path='include/styles/', $echo_tag=false)
&& ! file_exists($config['homedir'].'/'.$filename)
&& ! file_exists($config['homedir'].'/'.ENTERPRISE_DIR.'/'.$filename)
) {
return false;
}
if (is_metaconsole()) {
$config['css'][$name] = '/../../'.$filename;
} else {
$config['css'][$name] = $filename;
if (is_metaconsole() === true
&& file_exists('/../../'.$filename) === true
) {
$filename = '/../../'.$filename;
} else {
return false;
}
}
$config['css'][$name] = $filename;
return true;
}