set theme correctly when updating from 0.10.x

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-12-20 23:07:52 +01:00
parent 996b2e4a78
commit 4f89d7a9f0

View File

@@ -274,11 +274,12 @@ class UI
if (Froxlor::versionCompare2(Settings::Get('panel.version'), '2.0.0-beta1') == -1) { if (Froxlor::versionCompare2(Settings::Get('panel.version'), '2.0.0-beta1') == -1) {
// pre 2.0 // pre 2.0
Settings::Set('panel.default_theme', 'Froxlor'); Settings::Set('panel.default_theme', 'Froxlor');
} } else {
$theme = (Settings::Get('panel.default_theme') !== null) ? Settings::Get('panel.default_theme') : $theme; $theme = (Settings::Get('panel.default_theme') !== null) ? Settings::Get('panel.default_theme') : $theme;
// customer theme // customer theme
if (CurrentUser::hasSession() && CurrentUser::getField('theme') != $theme) { if (CurrentUser::hasSession() && CurrentUser::getField('theme') != $theme) {
$theme = CurrentUser::getField('theme'); $theme = CurrentUser::getField('theme');
}
} }
} }
if (!file_exists(Froxlor::getInstallDir() . '/templates/' . $theme)) { if (!file_exists(Froxlor::getInstallDir() . '/templates/' . $theme)) {