From 9a83872f226c20635feb2662d4d45df6f93de6a0 Mon Sep 17 00:00:00 2001 From: NOYB Date: Fri, 8 Jan 2016 02:45:14 -0800 Subject: Move unbound local zone types array to function in unbound.inc. Protect against breaking the system; check for valid unbound local zone type rather than just the setting existence. --- src/usr/local/www/services_unbound.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/usr') diff --git a/src/usr/local/www/services_unbound.php b/src/usr/local/www/services_unbound.php index 9b35c97..53f9299 100644 --- a/src/usr/local/www/services_unbound.php +++ b/src/usr/local/www/services_unbound.php @@ -310,23 +310,11 @@ $section->addInput(new Form_Select( true ))->addClass('general')->setHelp('Utilize different network interface(s) that the DNS Resolver will use to send queries to authoritative servers and receive their replies. By default all interfaces are used.'); -$unbound_local_zone_types = array( - "deny" => gettext("Deny"), - "refuse" => gettext("Refuse"), - "static" => gettext("Static"), - "transparent" => gettext("Transparent"), - "typetransparent" => gettext("Type Transparent"), - "redirect" => gettext("Redirect"), - "inform" => gettext("Inform"), - "inform_deny" => gettext("Inform Deny"), - "nodefault" => gettext("No Default" -)); - $section->addInput(new Form_Select( 'system_domain_local_zone_type', 'System Domain Local Zone Type', $pconfig['system_domain_local_zone_type'], - $unbound_local_zone_types + unbound_local_zone_types() ))->setHelp('The local-zone type used for the pfSense system domain (System | General Setup | Domain). Transparent is the default. Local-Zone type descriptions are available in the unbound.conf(5) manual pages.'); $section->addInput(new Form_Checkbox( -- cgit v1.1