summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_unbound_host_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/services_unbound_host_edit.php')
-rw-r--r--usr/local/www/services_unbound_host_edit.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/local/www/services_unbound_host_edit.php b/usr/local/www/services_unbound_host_edit.php
index 522feb3..6b365f2 100644
--- a/usr/local/www/services_unbound_host_edit.php
+++ b/usr/local/www/services_unbound_host_edit.php
@@ -42,7 +42,11 @@
##|*MATCH=services_unbound_host_edit.php*
##|-PRIV
-$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_unbound.php');
+if (isset($_POST['referer'])) {
+ $referer = $_POST['referer'];
+} else {
+ $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_unbound.php');
+}
function hostcmp($a, $b) {
return strcasecmp($a['host'], $b['host']);
@@ -320,6 +324,7 @@ include("head.inc");
<td width="78%">
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
<input type="button" class="formbtn" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
+ <input name="referer" type="hidden" value="<?=$referer;?>" />
<?php if (isset($id) && $a_hosts[$id]): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<?php endif; ?>
OpenPOWER on IntegriCloud