make selecting the used OS actually do something (load default-setting-adjustments required/needed; TBD)

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-02-15 15:43:18 +01:00
parent 96cdb34d71
commit f37d9d000c
6 changed files with 27 additions and 15 deletions

View File

@@ -194,9 +194,9 @@ class ConfigParser
}
// Get all defaults
$defaults = $this->xml->xpath('//defaults');
$defaults = $this->xml->xpath('//defaults/default');
foreach ($defaults as $default) {
$this->defaults = $default;
$this->defaults[] = $default;
}
// Switch flag to indicate we parsed our data

View File

@@ -72,11 +72,9 @@ class UI
if (function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get")) {
@date_default_timezone_set(@date_default_timezone_get());
}
self::sendSslHeaders();
}
private static function sendSslHeaders()
public static function sendSslHeaders()
{
/**
* If Froxlor was called via HTTPS -> enforce it for the next time by settings HSTS header according to settings

View File

@@ -2,6 +2,11 @@
<froxlor>
<distribution name="Debian" codename="Bullseye"
version="11.x" defaulteditor="/bin/nano">
<!-- OS defaults to be loaded on installation -->
<defaults>
<default settinggroup="system" varname="nssextrausers" value="1"></default>
<default settinggroup="system" varname="use_mod_proxy" value="1"></default>
</defaults>
<services>
<!-- HTTP -->
<service type="http" title="{{lng.admin.configfiles.http}}">

View File

@@ -48,6 +48,9 @@ use voku\helper\AntiXSS;
use Froxlor\PhpHelper;
use Froxlor\UI\Panel\UI;
// include MySQL-tabledefinitions
require \Froxlor\Froxlor::getInstallDir() . '/lib/tables.inc.php';
UI::sendHeaders();
UI::initTwig();
@@ -118,8 +121,8 @@ if (!isset($sql) || !is_array($sql)) {
'phpExceptionHandler'
]);
// include MySQL-tabledefinitions
require \Froxlor\Froxlor::getInstallDir() . '/lib/tables.inc.php';
// send ssl-related headers (later than the others because we need a working database-connection and installation)
UI::sendSslHeaders();
// create a new idna converter
$idna_convert = new \Froxlor\Idna\IdnaWrapper();