system: safety belts for dnsallowoverride #2751

bindsto wizard magic may be faulty still.  Shell scripts do stupid
things as well...
This commit is contained in:
Franco Fichtner 2018-09-23 11:14:40 +02:00
parent 4ebb368b2c
commit a07dca958f
2 changed files with 8 additions and 2 deletions

View File

@ -91,7 +91,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$config['system']['dnsserver'][] = $v4_server[0];
$config['system']['dnsserver'][] = $v4_server[1];
}
$config['system']['dnsallowoverride'] = false;
if (isset($config['system']['dnsallowoverride'])) {
unset($config['system']['dnsallowoverride']);
}
} else {
$config['system']['dnsserver'] = array();
$config['system']['dnsserver'][] = '';

View File

@ -136,7 +136,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
unset($config['system']['prefer_ipv4']);
}
$config['system']['dnsallowoverride'] = !empty($pconfig['dnsallowoverride']);
if (!empty($pconfig['dnsallowoverride'])) {
$config['system']['dnsallowoverride'] = true;
} elseif (isset($config['system']['dnsallowoverride'])) {
unset($config['system']['dnsallowoverride']);
}
if($pconfig['dnslocalhost'] == "yes") {
$config['system']['dnslocalhost'] = true;