From a13715575daa1fd79d24e05b51a3d4988b8f23ec Mon Sep 17 00:00:00 2001 From: Steve Beaver Date: Fri, 10 Feb 2017 14:40:13 -0500 Subject: GET/POST conversion firewall_nat_out* --- src/usr/local/www/firewall_nat_out.php | 36 ++++++++++++++--------------- src/usr/local/www/firewall_nat_out_edit.php | 18 ++++----------- 2 files changed, 23 insertions(+), 31 deletions(-) (limited to 'src/usr/local') diff --git a/src/usr/local/www/firewall_nat_out.php b/src/usr/local/www/firewall_nat_out.php index 2ee8824..7166fc1 100644 --- a/src/usr/local/www/firewall_nat_out.php +++ b/src/usr/local/www/firewall_nat_out.php @@ -148,10 +148,10 @@ if ($_POST['save']) { } // Delete a single rule/map -if ($_GET['act'] == "del") { +if ($_POST['act'] == "del") { - if ($a_out[$_GET['id']]) { - unset($a_out[$_GET['id']]); + if ($a_out[$_POST['id']]) { + unset($a_out[$_POST['id']]); if (write_config()) { mark_subsystem_dirty('natconf'); } @@ -181,12 +181,12 @@ if (isset($_POST['del_x'])) { exit; } -} else if ($_GET['act'] == "toggle") { - if ($a_out[$_GET['id']]) { - if (isset($a_out[$_GET['id']]['disabled'])) { - unset($a_out[$_GET['id']]['disabled']); +} else if ($_POST['act'] == "toggle") { + if ($a_out[$_POST['id']]) { + if (isset($a_out[$_POST['id']]['disabled'])) { + unset($a_out[$_POST['id']]['disabled']); } else { - $a_out[$_GET['id']]['disabled'] = true; + $a_out[$_POST['id']]['disabled'] = true; } if (write_config("Firewall: NAT: Outbound, enable/disable NAT rule")) { mark_subsystem_dirty('natconf'); @@ -323,7 +323,7 @@ print($form); - + " title=""> @@ -346,7 +346,7 @@ print($form); if (isset($alias['src'])): ?> - + @@ -369,7 +369,7 @@ print($form); if (isset($alias['srcport'])): ?> - + @@ -396,7 +396,7 @@ print($form); if (isset($alias['dst'])): ?> - + @@ -420,7 +420,7 @@ print($form); } else { if (isset($alias['dstport'])): ?> - + @@ -474,9 +474,9 @@ print($form); - " href="firewall_nat_out_edit.php?id="> - " href="firewall_nat_out_edit.php?dup="> - " href="firewall_nat_out.php?act=del&id="> + " href="firewall_nat_out_edit.php?id=" usepost> + " href="firewall_nat_out_edit.php?dup=" usepost> + " href="firewall_nat_out.php?act=del&id=" usepost>