aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-08-03 16:44:37 -0400
committerjim-p <jimp@pfsense.org>2010-08-03 16:45:11 -0400
commita782904bea74b51c5f5a92864d16b1992d356fbd (patch)
tree3e8c0bd698e5be0183bab6734c8d43e5516061ac
parent5948562b306870fe57f067067f3d33573ea36acc (diff)
downloadpfsense-packages-a782904bea74b51c5f5a92864d16b1992d356fbd.tar.gz
pfsense-packages-a782904bea74b51c5f5a92864d16b1992d356fbd.tar.bz2
pfsense-packages-a782904bea74b51c5f5a92864d16b1992d356fbd.zip
Fix these variable tests so they evaluate properly.
-rw-r--r--config/tinydns/tinydns.inc6
1 files changed, 3 insertions, 3 deletions
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);