From a782904bea74b51c5f5a92864d16b1992d356fbd Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 3 Aug 2010 16:44:37 -0400 Subject: Fix these variable tests so they evaluate properly. --- config/tinydns/tinydns.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config/tinydns') diff --git a/config/tinydns/tinydns.inc b/config/tinydns/tinydns.inc index 21b7ea2c..0659168f 100644 --- a/config/tinydns/tinydns.inc +++ b/config/tinydns/tinydns.inc @@ -39,7 +39,7 @@ if(!function_exists("get_real_wan_interface")) function tinydns_validate() { global $input_errors, $config; - if ($config['installedpackages']['tinydns']['config'][0]['enableforwarding']) { + if ($_POST['enableforwarding']) { if (isset($config['dnsmasq']['enable'])) $input_errors[] = "You have system dns-forwarder active. Disable it before enabling DNS-Cache Forwarders."; } @@ -229,7 +229,7 @@ function tinydns_custom_php_changeip_command() { exec("echo {$dnsserverip} > {$g['varetc_path']}/tinydns/env/IP"); exec("/usr/bin/killall -9 tinydns"); - if($config['installedpackages']['tinydns']['config'][0]['enableforwarding']) { + if(!empty($config['installedpackages']['tinydns']['config'][0]['enableforwarding'])) { $interfaces = explode(",", $config['installedpackages']['tinydns']['config'][0]['interface']); exec("/bin/cp {$g['varetc_path']}/resolv.conf {$g['varetc_path']}/resolv.conf.original"); exec("/bin/cp {$g['varetc_path']}/resolv.conf {$g['varetc_path']}/resolv.conf.dnscache"); @@ -436,7 +436,7 @@ function tinydns_create_zone_file() { if($config['installedpackages']['tinydns']['config'][0]['ipaddress'] == "127.0.0.1") { /* Load the root servers if Forwarding is enabled */ /* Register LAN IP and SOA Forward and Reverse DNS recors in TinyDNS Server*/ - if($config['installedpackages']['tinydns']['config'][0]['enableforwarding']) { + if(!empty($config['installedpackages']['tinydns']['config'][0]['enableforwarding'])) { $forwardingservers = tinydns_register_root_servers(); if($forwardingservers) fwrite($fd, $forwardingservers); -- cgit v1.2.3