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
committerJoe <jpassavanti@pint.com>2016-04-20 04:43:17 -0700
commitfc76a1e390c8ce9579df31457c74d1d0e572b78d (patch)
tree22e28e6e3f8382bd4866a14117ec22192844a4cb /src/usr/local/www/services_unbound_domainoverride_edit.php
parentee092d368102652570c86bca903deed5de103297 (diff)
downloadpfsense-fc76a1e390c8ce9579df31457c74d1d0e572b78d.zip
pfsense-fc76a1e390c8ce9579df31457c74d1d0e572b78d.tar.gz
adding privileges and separating DNS Resolver overrides from general settings
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 360f319..cd4f5aa 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;
}
}
@@ -180,6 +190,13 @@ if (isset($id) && $a_domainOverrides[$id]) {
));
}
+$section->addInput(new Form_Input(
+ 'referer',
+ null,
+ 'hidden',
+ $referer
+));
+
$form->add($section);
print $form;
OpenPOWER on IntegriCloud