diff --git a/src/www/services_unbound_overrides.php b/src/www/services_unbound_overrides.php index 094f007f9..effb007be 100644 --- a/src/www/services_unbound_overrides.php +++ b/src/www/services_unbound_overrides.php @@ -34,7 +34,7 @@ require_once("system.inc"); require_once("interfaces.inc"); $a_hosts = &config_read_array('unbound', 'hosts'); -config_read_array('unbound', 'domainoverrides'); +$a_domains = &config_read_array('unbound', 'domainoverrides'); /* Backwards compatibility for records created before introducing RR types. */ foreach ($a_hosts as $i => $hostent) { @@ -60,9 +60,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { exit; } } elseif (!empty($pconfig['act']) && $pconfig['act'] == 'doverride') { - $a_domainOverrides = &config_read_array('unbound', 'domainoverrides'); - if (isset($pconfig['id']) && !empty($a_domainOverrides[$pconfig['id']])) { - unset($a_domainOverrides[$pconfig['id']]); + if (isset($pconfig['id']) && !empty($a_domains[$pconfig['id']])) { + unset($a_domains[$pconfig['id']]); write_config(); mark_subsystem_dirty('unbound'); exit; @@ -71,10 +70,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } $service_hook = 'unbound'; -legacy_html_escape_form_data($a_hosts); -include_once("head.inc"); -?> +legacy_html_escape_form_data($a_hosts); +legacy_html_escape_form_data($a_domains); + +include_once("head.inc"); + +?>