From 7e7f432b72dae5ad03542f63eefd17f236e86345 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 3 Mar 2019 10:53:58 +0100 Subject: [PATCH] unbound: add aliases to listing; closes #3260 --- src/www/services_unbound_overrides.php | 120 ++++++++++++------------- 1 file changed, 57 insertions(+), 63 deletions(-) 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"); + +?>