diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-08-21 10:38:43 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-08-21 10:38:43 +0000 |
commit | 7515fb4b2a820c353af950eb452f9839635c8999 (patch) | |
tree | 711c58b9d0f379b04dc4b671f33cddba1635fe69 /usr/local/www | |
parent | 64fe3233cef313f9c14736d7941264aed7067bf5 (diff) | |
download | pfsense-7515fb4b2a820c353af950eb452f9839635c8999.zip pfsense-7515fb4b2a820c353af950eb452f9839635c8999.tar.gz |
Use global variable which defines the tmp_path and remove hardcoded ones.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index 39dd5c3..669f654 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -55,14 +55,14 @@ if($_POST) // Debugging if($debug) - exec("rm -f /tmp/alias_rename_log.txt"); + exec("rm -f {$g['tmp_path']}/alias_rename_log.txt"); function update_alias_names_upon_change($section, $subsection, $fielda, $fieldb, $new_alias_name) { - global $config, $pconfig, $origname, $debug; + global $g, $config, $pconfig, $origname, $debug; if(!$origname) return; - if($debug) $fd = fopen("/tmp/print_r", "a"); + if($debug) $fd = fopen("{$g['tmp_path']}/print_r", "a"); if($debug) fwrite($fd, print_r($pconfig, true)); if($fieldb) { @@ -201,9 +201,9 @@ if ($_POST) { if($_POST['address' . $x]) { /* fetch down and add in */ $isfirst = 0; - $temp_filename = tempnam("/tmp/", "alias_import"); + $temp_filename = tempnam("{$g['tmp_path]}/", "alias_import"); unlink($temp_filename); - $fda = fopen("/tmp/tmpfetch","w"); + $fda = fopen("{$g['tmp_path']}/tmpfetch","w"); fwrite($fda, "/usr/bin/fetch -q -o \"{$temp_filename}/aliases\" \"" . $_POST['address' . $x] . "\""); fclose($fda); mwexec("mkdir -p {$temp_filename}"); |