From 4f89d7a9f0edb8caa5d85a9b32942cb4b23051be Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Tue, 20 Dec 2022 23:07:52 +0100 Subject: [PATCH 1/2] set theme correctly when updating from 0.10.x Signed-off-by: Michael Kaufmann --- lib/Froxlor/UI/Panel/UI.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/Froxlor/UI/Panel/UI.php b/lib/Froxlor/UI/Panel/UI.php index 51028033..4438f4fd 100644 --- a/lib/Froxlor/UI/Panel/UI.php +++ b/lib/Froxlor/UI/Panel/UI.php @@ -274,11 +274,12 @@ class UI if (Froxlor::versionCompare2(Settings::Get('panel.version'), '2.0.0-beta1') == -1) { // pre 2.0 Settings::Set('panel.default_theme', 'Froxlor'); - } - $theme = (Settings::Get('panel.default_theme') !== null) ? Settings::Get('panel.default_theme') : $theme; - // customer theme - if (CurrentUser::hasSession() && CurrentUser::getField('theme') != $theme) { - $theme = CurrentUser::getField('theme'); + } else { + $theme = (Settings::Get('panel.default_theme') !== null) ? Settings::Get('panel.default_theme') : $theme; + // customer theme + if (CurrentUser::hasSession() && CurrentUser::getField('theme') != $theme) { + $theme = CurrentUser::getField('theme'); + } } } if (!file_exists(Froxlor::getInstallDir() . '/templates/' . $theme)) { From a81065a1b08cb4fd1fa241fdafe6d4a565d8202e Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Wed, 21 Dec 2022 11:54:29 +0100 Subject: [PATCH 2/2] add dashboard-language string, fix missing { in customer_mysql Signed-off-by: Michael Kaufmann --- customer_mysql.php | 2 +- lng/en.lng.php | 1 + templates/Froxlor/user/index.html.twig | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/customer_mysql.php b/customer_mysql.php index d285b332..f806d147 100644 --- a/customer_mysql.php +++ b/customer_mysql.php @@ -40,7 +40,7 @@ use Froxlor\UI\Response; use Froxlor\CurrentUser; // redirect if this customer page is hidden via settings or no resources given -if (Settings::IsInList('panel.customer_hide_options', 'mysql') || $userinfo['mysqls'] == 0) +if (Settings::IsInList('panel.customer_hide_options', 'mysql') || $userinfo['mysqls'] == 0) { Response::redirectTo('customer_index.php'); } diff --git a/lng/en.lng.php b/lng/en.lng.php index 11de60c3..67d5fd9f 100644 --- a/lng/en.lng.php +++ b/lng/en.lng.php @@ -1328,6 +1328,7 @@ Yours sincerely, your administrator', 'description' => 'Select the field you want to search in' ], 'upload_import' => 'Upload and import', + 'dashboard' => 'Dashboard', ], 'phpfpm' => [ 'vhost_httpuser' => 'Local user to use for PHP-FPM (Froxlor vHost)', diff --git a/templates/Froxlor/user/index.html.twig b/templates/Froxlor/user/index.html.twig index 413e810f..7a26c595 100644 --- a/templates/Froxlor/user/index.html.twig +++ b/templates/Froxlor/user/index.html.twig @@ -1,7 +1,7 @@ {% extends "Froxlor/userarea.html.twig" %} {% block content %} - + {% if get_setting('panel.is_configured') == 0 and userinfo.adminsession == 1 and userinfo.change_serversettings == 1 %}