summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_unbound_domainoverride_edit.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-06-22 10:18:14 -0400
committerStephen Beaver <sbeaver@netgate.com>2016-06-22 10:18:14 -0400
commitdbab5a7ea8eb7eceaabcc488aa9174124818e217 (patch)
treefa1aedaa2d73feec0bcaf6868cc26bc881ac3e68 /src/usr/local/www/services_unbound_domainoverride_edit.php
parent90913bc71020950289c1502fac4286f0633d6dff (diff)
parentfc76a1e390c8ce9579df31457c74d1d0e572b78d (diff)
downloadpfsense-dbab5a7ea8eb7eceaabcc488aa9174124818e217.zip
pfsense-dbab5a7ea8eb7eceaabcc488aa9174124818e217.tar.gz
Merge pull request #2891 from gottaloveit/dns-overrides-privs
Diffstat (limited to 'src/usr/local/www/services_unbound_domainoverride_edit.php')
-rw-r--r--src/usr/local/www/services_unbound_domainoverride_edit.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/usr/local/www/services_unbound_domainoverride_edit.php b/src/usr/local/www/services_unbound_domainoverride_edit.php
index ed64580..cb01888 100644
--- a/src/usr/local/www/services_unbound_domainoverride_edit.php
+++ b/src/usr/local/www/services_unbound_domainoverride_edit.php
@@ -86,6 +86,8 @@ if (isset($id) && $a_domainOverrides[$id]) {
$pconfig['descr'] = $a_domainOverrides[$id]['descr'];
}
+$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_unbound.php');
+
if ($_POST) {
unset($input_errors);
@@ -120,6 +122,10 @@ if ($_POST) {
$input_errors[] = gettext("A valid IP address must be specified, for example 192.168.100.10.");
}
}
+
+ if ($_POST['referer']) {
+ $referer = $_POST['referer'];
+ }
if (!$input_errors) {
$doment = array();
@@ -136,8 +142,12 @@ if ($_POST) {
mark_subsystem_dirty('unbound');
write_config();
-
- header("Location: services_unbound.php");
+
+ if ($referer == '/services_unbound_overrides.php') {
+ header("Location: services_unbound_overrides.php");
+ } else {
+ header("Location: services_unbound.php");
+ }
exit;
}
}
@@ -184,6 +194,13 @@ if (isset($id) && $a_domainOverrides[$id]) {
));
}
+$section->addInput(new Form_Input(
+ 'referer',
+ null,
+ 'hidden',
+ $referer
+));
+
$form->add($section);
print $form;
OpenPOWER on IntegriCloud