Merge branch 'main' of github.com:Froxlor/Froxlor

This commit is contained in:
Maurice Preuß (envoyr)
2022-12-21 20:25:11 +01:00
4 changed files with 9 additions and 7 deletions

View File

@@ -40,7 +40,7 @@ use Froxlor\UI\Response;
use Froxlor\CurrentUser; use Froxlor\CurrentUser;
// redirect if this customer page is hidden via settings or no resources given // 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'); Response::redirectTo('customer_index.php');
} }

View File

@@ -274,13 +274,14 @@ 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)) {
PhpHelper::phpErrHandler(E_USER_WARNING, "Theme '" . $theme . "' could not be found.", __FILE__, __LINE__); PhpHelper::phpErrHandler(E_USER_WARNING, "Theme '" . $theme . "' could not be found.", __FILE__, __LINE__);
$theme = self::$default_theme; $theme = self::$default_theme;

View File

@@ -1328,6 +1328,7 @@ Yours sincerely, your administrator',
'description' => 'Select the field you want to search in' 'description' => 'Select the field you want to search in'
], ],
'upload_import' => 'Upload and import', 'upload_import' => 'Upload and import',
'dashboard' => 'Dashboard',
], ],
'phpfpm' => [ 'phpfpm' => [
'vhost_httpuser' => 'Local user to use for PHP-FPM (Froxlor vHost)', 'vhost_httpuser' => 'Local user to use for PHP-FPM (Froxlor vHost)',

View File

@@ -1,7 +1,7 @@
{% extends "Froxlor/userarea.html.twig" %} {% extends "Froxlor/userarea.html.twig" %}
{% block content %} {% block content %}
<h3 class="page-header">Dashboard</h3> <h3 class="page-header">{{ lng('panel.dashboard') }}</h3>
{% if get_setting('panel.is_configured') == 0 and userinfo.adminsession == 1 and userinfo.change_serversettings == 1 %} {% if get_setting('panel.is_configured') == 0 and userinfo.adminsession == 1 and userinfo.change_serversettings == 1 %}
<div class="alert alert-info position-relative p-5"> <div class="alert alert-info position-relative p-5">