summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_unbound_domainoverride_edit.php
diff options
context:
space:
mode:
authorJoe <jpassavanti@pint.com>2016-04-19 20:19:11 -0700
committerStephen Beaver <sbeaver@netgate.com>2016-06-22 10:18:41 -0400
commit54147cc682c89aaa73fcd41b61fa9464a14cc5fb (patch)
tree60035cd857f31fa8455831b0f2a83fa6e8d51f60 /src/usr/local/www/services_unbound_domainoverride_edit.php
parent088ffabc3bf67a48a04ff6abb59ce8b33ce3927c (diff)
downloadpfsense-54147cc682c89aaa73fcd41b61fa9464a14cc5fb.zip
pfsense-54147cc682c89aaa73fcd41b61fa9464a14cc5fb.tar.gz
adding privileges and separating DNS Resolver overrides from general settings
(cherry picked from commit fc76a1e390c8ce9579df31457c74d1d0e572b78d)
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