summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_wol_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/services_wol_edit.php')
-rw-r--r--usr/local/www/services_wol_edit.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/local/www/services_wol_edit.php b/usr/local/www/services_wol_edit.php
index 66481bf..031ba83 100644
--- a/usr/local/www/services_wol_edit.php
+++ b/usr/local/www/services_wol_edit.php
@@ -52,7 +52,11 @@ function wol_sort() {
require("guiconfig.inc");
-$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_wol.php');
+if (isset($_POST['referer'])) {
+ $referer = $_POST['referer'];
+} else {
+ $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/services_wol.php');
+}
if (!is_array($config['wol']['wolentry'])) {
$config['wol']['wolentry'] = array();
@@ -163,6 +167,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_wol[$id]): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<?php endif; ?>
OpenPOWER on IntegriCloud