From db88a3a261c482195d929a2ab9eaee29aae59ae0 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sun, 28 Dec 2014 16:36:53 +0545 Subject: Fix unbound shortcut links Fixes redmine #4151 1) Make the naming in shortcuts.inc more clear - forwarder=dnsmasq resolver=unbound 2) Make the value of $shortcuts_section correct in each dnsmasq and unbound php code 3) Make diag_logs_resolver.php smarter, so if dnsmasq is enabled, then show shortcuts for dnsmasq, otherwise show shortcuts for unbound. 4) Fix some references to forwarder in unbound code - should be resolver. --- usr/local/www/diag_logs_resolver.php | 6 +++++- usr/local/www/services_dnsmasq.php | 2 +- usr/local/www/services_dnsmasq_domainoverride_edit.php | 2 +- usr/local/www/services_dnsmasq_edit.php | 2 +- usr/local/www/services_unbound.php | 2 +- usr/local/www/services_unbound_acls.php | 1 + usr/local/www/services_unbound_advanced.php | 1 + usr/local/www/services_unbound_host_edit.php | 6 +++--- usr/local/www/shortcuts.inc | 14 +++++++------- 9 files changed, 21 insertions(+), 15 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/diag_logs_resolver.php b/usr/local/www/diag_logs_resolver.php index 8773fbe..c46c295 100755 --- a/usr/local/www/diag_logs_resolver.php +++ b/usr/local/www/diag_logs_resolver.php @@ -65,7 +65,11 @@ if ($filtertext) $filtertextmeta="?filtertext=$filtertext"; $pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Resolver")); -$shortcut_section = "resolver"; +if (isset($config['dnsmasq']['enable'])) + $shortcut_section = "forwarder"; +else + $shortcut_section = "resolver"; + include("head.inc"); ?> diff --git a/usr/local/www/services_dnsmasq.php b/usr/local/www/services_dnsmasq.php index 75feda9..ee5cc2c 100644 --- a/usr/local/www/services_dnsmasq.php +++ b/usr/local/www/services_dnsmasq.php @@ -151,7 +151,7 @@ if ($_GET['act'] == "del") { $closehead = false; $pgtitle = array(gettext("Services"),gettext("DNS forwarder")); -$shortcut_section = "resolver"; +$shortcut_section = "forwarder"; include("head.inc"); ?> diff --git a/usr/local/www/services_dnsmasq_domainoverride_edit.php b/usr/local/www/services_dnsmasq_domainoverride_edit.php index 31d8564..15cdfc3 100644 --- a/usr/local/www/services_dnsmasq_domainoverride_edit.php +++ b/usr/local/www/services_dnsmasq_domainoverride_edit.php @@ -120,7 +120,7 @@ if ($_POST) { } $pgtitle = array(gettext("Services"),gettext("DNS forwarder"),gettext("Edit Domain Override")); -$shortcut_section = "resolver"; +$shortcut_section = "forwarder"; include("head.inc"); ?> diff --git a/usr/local/www/services_dnsmasq_edit.php b/usr/local/www/services_dnsmasq_edit.php index 17acc92..0ad863d 100644 --- a/usr/local/www/services_dnsmasq_edit.php +++ b/usr/local/www/services_dnsmasq_edit.php @@ -180,7 +180,7 @@ if ($_POST) { } $pgtitle = array(gettext("Services"),gettext("DNS forwarder"),gettext("Edit host")); -$shortcut_section = "resolver"; +$shortcut_section = "forwarder"; include("head.inc"); ?> diff --git a/usr/local/www/services_unbound.php b/usr/local/www/services_unbound.php index d07d56d..7231ee7 100644 --- a/usr/local/www/services_unbound.php +++ b/usr/local/www/services_unbound.php @@ -202,7 +202,7 @@ if ($_GET['act'] == "del") { $closehead = false; $pgtitle = array(gettext("Services"),gettext("DNS Resolver")); -$shortcut_section = "unbound"; +$shortcut_section = "resolver"; include_once("head.inc"); ?> diff --git a/usr/local/www/services_unbound_acls.php b/usr/local/www/services_unbound_acls.php index 1c81949..d2fa3f8 100644 --- a/usr/local/www/services_unbound_acls.php +++ b/usr/local/www/services_unbound_acls.php @@ -145,6 +145,7 @@ if ($_POST) { $closehead = false; $pgtitle = "Services: DNS Resolver: Access Lists"; +$shortcut_section = "resolver"; include("head.inc"); ?> diff --git a/usr/local/www/services_unbound_advanced.php b/usr/local/www/services_unbound_advanced.php index 3169486..43b03c9 100644 --- a/usr/local/www/services_unbound_advanced.php +++ b/usr/local/www/services_unbound_advanced.php @@ -184,6 +184,7 @@ if ($_POST) { $closehead = false; $pgtitle = array(gettext("Services"),gettext("DNS Resolver"),gettext("Advanced")); +$shortcut_section = "resolver"; include_once("head.inc"); ?> diff --git a/usr/local/www/services_unbound_host_edit.php b/usr/local/www/services_unbound_host_edit.php index 309ec37..df4c75f 100644 --- a/usr/local/www/services_unbound_host_edit.php +++ b/usr/local/www/services_unbound_host_edit.php @@ -32,13 +32,13 @@ POSSIBILITY OF SUCH DAMAGE. */ /* - pfSense_MODULE: dnsforwarder + pfSense_MODULE: dnsresolver */ ##|+PRIV ##|*IDENT=page-services-dnsresolver-edithost -##|*NAME=Services: DNS Forwarder: Edit host page -##|*DESCR=Allow access to the 'Services: DNS Forwarder: Edit host' page. +##|*NAME=Services: DNS Resolver: Edit host page +##|*DESCR=Allow access to the 'Services: DNS Resolver: Edit host' page. ##|*MATCH=services_unbound_host_edit.php* ##|-PRIV diff --git a/usr/local/www/shortcuts.inc b/usr/local/www/shortcuts.inc index a99f35c..1b141cf 100644 --- a/usr/local/www/shortcuts.inc +++ b/usr/local/www/shortcuts.inc @@ -220,15 +220,15 @@ $shortcuts['trafficshaper-limiters'] = array(); $shortcuts['trafficshaper-limiters']['main'] = "firewall_shaper_vinterface.php"; $shortcuts['trafficshaper-limiters']['status'] = "diag_limiter_info.php"; +$shortcuts['forwarder'] = array(); +$shortcuts['forwarder']['main'] = "services_dnsmasq.php"; +$shortcuts['forwarder']['log'] = "diag_logs_resolver.php"; +$shortcuts['forwarder']['service'] = "dnsmasq"; + $shortcuts['resolver'] = array(); -$shortcuts['resolver']['main'] = "services_dnsmasq.php"; +$shortcuts['resolver']['main'] = "services_unbound.php"; $shortcuts['resolver']['log'] = "diag_logs_resolver.php"; -$shortcuts['resolver']['service'] = "dnsmasq"; - -$shortcuts['unbound'] = array(); -$shortcuts['unbound']['main'] = "services_unbound.php"; -$shortcuts['unbound']['log'] = "diag_logs_resolver.php"; -$shortcuts['unbound']['service'] = "unbound"; +$shortcuts['resolver']['service'] = "unbound"; $shortcuts['wireless'] = array(); $shortcuts['wireless']['main'] = "interfaces_wireless.php"; -- cgit v1.1