summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_aliases.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-04-02 12:33:50 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-04-02 12:34:43 -0300
commitac7f1763e1712dd85335f09d0434444cee2a6683 (patch)
tree1783297632dbc286b067fd7e7ff47a92e9e3911b /usr/local/www/firewall_aliases.php
parent9db1ff32c7005da50baf78e089608e7eb72eae9a (diff)
downloadpfsense-ac7f1763e1712dd85335f09d0434444cee2a6683.zip
pfsense-ac7f1763e1712dd85335f09d0434444cee2a6683.tar.gz
Return to correct tab after save or delete an alias
Diffstat (limited to 'usr/local/www/firewall_aliases.php')
-rwxr-xr-xusr/local/www/firewall_aliases.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr/local/www/firewall_aliases.php b/usr/local/www/firewall_aliases.php
index 878a002..e5de4b6 100755
--- a/usr/local/www/firewall_aliases.php
+++ b/usr/local/www/firewall_aliases.php
@@ -50,10 +50,9 @@ if (!is_array($config['aliases']['alias']))
$config['aliases']['alias'] = array();
$a_aliases = &$config['aliases']['alias'];
-if ($_POST) {
+$tab = ($_REQUEST['tab'] == "" ? "ip" : preg_replace("/\W/","",$_REQUEST['tab']));
- if($_POST['tab'])
- $tab = $_POST['tab'];
+if ($_POST) {
if ($_POST['apply']) {
$retval = 0;
@@ -111,7 +110,7 @@ if ($_GET['act'] == "del") {
filter_configure();
mark_subsystem_dirty('aliases');
}
- header("Location: firewall_aliases.php");
+ header("Location: firewall_aliases.php?tab=" . $tab);
exit;
}
}
@@ -171,7 +170,6 @@ include("head.inc");
<tr>
<td class="tabnavtbl">
<?php
- $tab=($_REQUEST['tab'] == "" ? "ip" : preg_replace("/\W/","",$_REQUEST['tab']));
$tab_array = array();
$tab_array[] = array(gettext("IP"),($tab=="ip" ? true : ($tab=="host" ? true : ($tab == "network" ? true : false))), "/firewall_aliases.php?tab=ip");
$tab_array[] = array(gettext("Ports"), ($tab=="port"? true : false), "/firewall_aliases.php?tab=port");
@@ -256,7 +254,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle"><a href="firewall_aliases_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" <?=dom_title(gettext("Edit alias")." {$alias['name']}");?>></a></td>
- <td><a href="firewall_aliases.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this alias? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" <?=dom_title(gettext("Delete alias")." {$alias['name']}");?>></a></td>
+ <td><a href="firewall_aliases.php?act=del&tab=<?=$tab;?>&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this alias? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" <?=dom_title(gettext("Delete alias")." {$alias['name']}");?>></a></td>
</tr>
</table>
</td>
OpenPOWER on IntegriCloud