From 1467dab58f72fcbcc7185ddb7000a5939202a7fb Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Fri, 8 Dec 2023 11:48:32 +0100 Subject: [PATCH] set version to 2.1.0 for upcoming stable release Signed-off-by: Michael Kaufmann --- install/froxlor.sql.php | 2 +- install/updates/froxlor/update_2.1.inc.php | 5 ++++ lib/Froxlor/Froxlor.php | 2 +- lib/init.php | 9 ++++--- templates/Froxlor/user/index.html.twig | 30 +++++++++------------- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/install/froxlor.sql.php b/install/froxlor.sql.php index 50456bd9..ca575698 100644 --- a/install/froxlor.sql.php +++ b/install/froxlor.sql.php @@ -678,7 +678,7 @@ opcache.validate_timestamps'), ('system', 'distribution', ''), ('system', 'update_channel', 'stable'), ('system', 'updatecheck_data', ''), - ('system', 'update_notify_last', '2.1.0-rc3'), + ('system', 'update_notify_last', '2.1.0'), ('system', 'traffictool', 'goaccess'), ('system', 'req_limit_per_interval', 60), ('system', 'req_limit_interval', 60), diff --git a/install/updates/froxlor/update_2.1.inc.php b/install/updates/froxlor/update_2.1.inc.php index 2f0a2971..1709762c 100644 --- a/install/updates/froxlor/update_2.1.inc.php +++ b/install/updates/froxlor/update_2.1.inc.php @@ -203,3 +203,8 @@ if (Froxlor::isDatabaseVersion('202311260')) { } Froxlor::updateToDbVersion('202312050'); } + +if (Froxlor::isFroxlorVersion('2.1.0-rc3')) { + Update::showUpdateStep("Updating from 2.1.0-rc3 to 2.1.0 stable", false); + Froxlor::updateToVersion('2.1.0'); +} diff --git a/lib/Froxlor/Froxlor.php b/lib/Froxlor/Froxlor.php index 2f74be58..c06f653d 100644 --- a/lib/Froxlor/Froxlor.php +++ b/lib/Froxlor/Froxlor.php @@ -31,7 +31,7 @@ final class Froxlor { // Main version variable - const VERSION = '2.1.0-rc3'; + const VERSION = '2.1.0'; // Database version (YYYYMMDDC where C is a daily counter) const DBVERSION = '202312050'; diff --git a/lib/init.php b/lib/init.php index 1e4cf507..3b8e5b82 100644 --- a/lib/init.php +++ b/lib/init.php @@ -115,14 +115,15 @@ if (!isset($sql) || !is_array($sql)) { /** * Show nice note if requested domain is "unknown" to froxlor and thus is being lead to its vhost */ -if ($_SERVER['SERVER_NAME'] != Settings::Get('system.hostname') && +$req_host = UI::getCookieHost(); +if ($req_host != Settings::Get('system.hostname') && Settings::Get('panel.is_configured') == 1 && - !filter_var($_SERVER['SERVER_NAME'], FILTER_VALIDATE_IP) && ( + !filter_var($req_host, FILTER_VALIDATE_IP) && ( empty(Settings::Get('system.froxloraliases')) || - (!empty(Settings::Get('system.froxloraliases')) && !in_array($_SERVER['SERVER_NAME'], array_map('trim', explode(',', Settings::Get('system.froxloraliases'))))) + (!empty(Settings::Get('system.froxloraliases')) && !in_array($req_host, array_map('trim', explode(',', Settings::Get('system.froxloraliases'))))) )) { // not the froxlor system-hostname, show info page for domains not configured in froxlor - $redirect_file = FileDir::getUnknownDomainTemplate($_SERVER['SERVER_NAME']); + $redirect_file = FileDir::getUnknownDomainTemplate($req_host); header('Location: '.$redirect_file); die(); } diff --git a/templates/Froxlor/user/index.html.twig b/templates/Froxlor/user/index.html.twig index b8672f8f..c788b012 100644 --- a/templates/Froxlor/user/index.html.twig +++ b/templates/Froxlor/user/index.html.twig @@ -51,8 +51,16 @@
{% if userinfo.adminsession == 1 %} -
+
+ + {% if userinfo.custom_notes|markdown is not empty and userinfo.custom_notes_show == 1 %} +
+
+ {{ userinfo.custom_notes|markdown|raw }} +
+
+ {% endif %} + {# system infos #}
@@ -135,22 +143,9 @@ {% endif %}
- - {% if userinfo.custom_notes|markdown is not empty and userinfo.custom_notes_show == 1 %} -
-
    -
  • -
    - {{ userinfo.custom_notes|markdown|raw }} -
    -
  • -
-
- {% endif %}
{% else %} -
+
{# account info #}
@@ -212,8 +207,7 @@
-
+
{# customer details #}