summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-06-19 17:35:31 +0200
committerErmal LUÇI <eri@pfsense.org>2015-06-19 17:35:31 +0200
commit3378289af3f39b231de2c26e298d85d3eca4c835 (patch)
tree95d84a2d680bd9e940c050f176982abc80dfab75 /usr/local/www
parent320ed23cef4e60d143f690732ae0b08ab5487726 (diff)
downloadpfsense-3378289af3f39b231de2c26e298d85d3eca4c835.zip
pfsense-3378289af3f39b231de2c26e298d85d3eca4c835.tar.gz
Ticket #4746 Correctly set global variables to be used by hostnames cod epaths
Diffstat (limited to 'usr/local/www')
-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 dc33739..674e220 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";
@@ -64,6 +66,7 @@ $cpzone = $_GET['zone'];
if (isset($_POST['zone'])) {
$cpzone = $_POST['zone'];
}
+$cpzoneid = $config['captiveportal'][$cpzone]['zoneid'];
if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) {
header("Location: services_captiveportal_zones.php");
@@ -154,8 +157,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