summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_aliases_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-08-20 17:59:31 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-08-20 17:59:31 -0400
commitf5200c44757b817a194d63aea45b874519279830 (patch)
tree46f1c24d8272df456a661ed66c635341af86472d /usr/local/www/firewall_aliases_edit.php
parented0b79491f43ee7c0e705256fbba1a6ac081942c (diff)
downloadpfsense-f5200c44757b817a194d63aea45b874519279830.zip
pfsense-f5200c44757b817a194d63aea45b874519279830.tar.gz
Add missing debug checks
Diffstat (limited to 'usr/local/www/firewall_aliases_edit.php')
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index 1aaec7e..80576d4 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -54,14 +54,15 @@ if($_POST)
$origname = $_POST['origname'];
// Debugging
-exec("rm -f /tmp/print_r");
+if($debug)
+ exec("rm -f /tmp/print_r");
function update_alias_names_upon_change($section, $subsection, $fielda, $fieldb, $new_alias_name) {
- global $config, $pconfig, $origname, $fd;
+ global $config, $pconfig, $origname, $debug;
if(!$origname)
return;
- $fd = fopen("/tmp/print_r", "a");
+ if($debug) $fd = fopen("/tmp/print_r", "a");
if($debug) fwrite($fd, print_r($pconfig, true));
if($fieldb) {
@@ -83,7 +84,7 @@ function update_alias_names_upon_change($section, $subsection, $fielda, $fieldb,
}
}
- fclose($fd);
+ if($debug) fclose($fd);
}
OpenPOWER on IntegriCloud