summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-06-19 17:33:19 +0200
committerErmal LUÇI <eri@pfsense.org>2015-06-19 17:33:19 +0200
commitfabb4b0321514813bbb0307671c8605c7c1b36e0 (patch)
treebd877a5ce3ad66e681bb62ea8a617efcb1d1d54a /usr
parent7dc35024af3af1d644c25b002ca9f40f1d61c05b (diff)
downloadpfsense-fabb4b0321514813bbb0307671c8605c7c1b36e0.zip
pfsense-fabb4b0321514813bbb0307671c8605c7c1b36e0.tar.gz
Ticket #4746 Correctly set global variables to be used by hostnames cod epaths
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/services_captiveportal_hostname_edit.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/www/services_captiveportal_hostname_edit.php b/usr/local/www/services_captiveportal_hostname_edit.php
index 9d7c7d6..9eff9d0 100644
--- a/usr/local/www/services_captiveportal_hostname_edit.php
+++ b/usr/local/www/services_captiveportal_hostname_edit.php
@@ -57,6 +57,8 @@ require_once("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
+global $cpzone, $cpzoneid;
+
$pgtitle = array(gettext("Services"),gettext("Captive portal"),gettext("Edit allowed Hostname"));
$shortcut_section = "captiveportal";
@@ -68,6 +70,7 @@ if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) {
header("Location: services_captiveportal_zones.php");
exit;
}
+$cpzoneid = $config['captiveportal'][$cpzone]['zoneid'];
if (!is_array($config['captiveportal']))
$config['captiveportal'] = array();
@@ -142,8 +145,7 @@ if ($_POST) {
$rules = captiveportal_allowedhostname_configure();
@file_put_contents("{$g['tmp_path']}/hostname_rules", $rules);
- $cpzoneid = $a_cp[$cpzone]['zoneid'];
- mwexec("/sbin/ipfw -x {$cpzoneid} {$g['tmp_path']}/hostname_rules");
+ mwexec("/sbin/ipfw -x {$cpzoneid} {$g['tmp_path']}/hostname_rules", true);
unset($rules);
header("Location: services_captiveportal_hostname.php?zone={$cpzone}");
OpenPOWER on IntegriCloud