Commit 342d7bec authored by Franco Fichtner's avatar Franco Fichtner

system: address oddities in general setup

(cherry picked from commit 4fa4d211)
parent 7e34c30e
...@@ -42,7 +42,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -42,7 +42,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['theme'] = null; $pconfig['theme'] = null;
$pconfig['language'] = null; $pconfig['language'] = null;
$pconfig['timezone'] = "Etc/UTC"; $pconfig['timezone'] = 'Etc/UTC';
$pconfig['prefer_ipv4'] = isset($config['system']['prefer_ipv4']); $pconfig['prefer_ipv4'] = isset($config['system']['prefer_ipv4']);
$pconfig['gw_switch_default'] = isset($config['system']['gw_switch_default']); $pconfig['gw_switch_default'] = isset($config['system']['gw_switch_default']);
$pconfig['hostname'] = $config['system']['hostname']; $pconfig['hostname'] = $config['system']['hostname'];
...@@ -66,9 +66,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -66,9 +66,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} }
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']); $pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') { } elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_POST['timezone']) && $pconfig['timezone'] <> $_POST['timezone']) {
filter_pflog_start();
}
$input_errors = array(); $input_errors = array();
$pconfig = $_POST; $pconfig = $_POST;
...@@ -212,6 +209,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -212,6 +209,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
/* time zone change first */ /* time zone change first */
system_timezone_configure(); system_timezone_configure();
filter_pflog_start();
prefer_ipv4_or_ipv6(); prefer_ipv4_or_ipv6();
system_hostname_configure(); system_hostname_configure();
system_hosts_generate(); system_hosts_generate();
...@@ -319,9 +317,8 @@ include("head.inc"); ...@@ -319,9 +317,8 @@ include("head.inc");
<td> <td>
<select name="theme" class="selectpicker" data-size="10" data-width="auto"> <select name="theme" class="selectpicker" data-size="10" data-width="auto">
<?php <?php
$curtheme = get_current_theme();
foreach (return_dir_as_array('/usr/local/opnsense/www/themes/') as $file):?> foreach (return_dir_as_array('/usr/local/opnsense/www/themes/') as $file):?>
<option <?=$file == $curtheme ? "selected=\"selected\"" : "";?>> <option <?= $file == $pconfig['theme'] ? 'selected="selected"' : '' ?>>
<?=$file;?> <?=$file;?>
</option> </option>
<?php <?php
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment