summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-02-10 15:34:58 -0500
committerSteve Beaver <sbeaver@netgate.com>2017-02-10 15:34:58 -0500
commite3947e772a9caa00403001ddeda9270d1f821547 (patch)
treebc573bb906ac3a90039543740b919fafc51c6203 /src/usr/local/www/firewall_rules_edit.php
parenta13715575daa1fd79d24e05b51a3d4988b8f23ec (diff)
downloadpfsense-e3947e772a9caa00403001ddeda9270d1f821547.zip
pfsense-e3947e772a9caa00403001ddeda9270d1f821547.tar.gz
GET/POST conversion firewall_rules
guiconfig.php display_top_tabs supports "usepost" as an optional 4th argument
Diffstat (limited to 'src/usr/local/www/firewall_rules_edit.php')
-rw-r--r--src/usr/local/www/firewall_rules_edit.php24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index dd87533..d4d6e29 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -139,23 +139,17 @@ if (!is_array($config['filter']['rule'])) {
filter_rules_sort();
$a_filter = &$config['filter']['rule'];
-if (is_numericint($_GET['id'])) {
- $id = $_GET['id'];
-}
if (isset($_POST['id']) && is_numericint($_POST['id'])) {
$id = $_POST['id'];
}
-if (is_numericint($_GET['after']) || $_GET['after'] == "-1") {
- $after = $_GET['after'];
-}
if (isset($_POST['after']) && (is_numericint($_POST['after']) || $_POST['after'] == "-1")) {
$after = $_POST['after'];
}
-if (isset($_GET['dup']) && is_numericint($_GET['dup'])) {
- $id = $_GET['dup'];
- $after = $_GET['dup'];
+if (isset($_POST['dup']) && is_numericint($_POST['dup'])) {
+ $id = $_POST['dup'];
+ $after = $_POST['dup'];
}
if (isset($id) && $a_filter[$id]) {
@@ -284,7 +278,7 @@ if (isset($id) && $a_filter[$id]) {
$pconfig['sched'] = (($a_filter[$id]['sched'] == "none") ? '' : $a_filter[$id]['sched']);
$pconfig['vlanprio'] = (($a_filter[$id]['vlanprio'] == "none") ? '' : $a_filter[$id]['vlanprio']);
$pconfig['vlanprioset'] = (($a_filter[$id]['vlanprioset'] == "none") ? '' : $a_filter[$id]['vlanprioset']);
- if (!isset($_GET['dup']) || !is_numericint($_GET['dup'])) {
+ if (!isset($_POST['dup']) || !is_numericint($_POST['dup'])) {
$pconfig['associated-rule-id'] = $a_filter[$id]['associated-rule-id'];
}
@@ -292,8 +286,8 @@ if (isset($id) && $a_filter[$id]) {
} else {
/* defaults */
- if ($_GET['if']) {
- $pconfig['interface'] = $_GET['if'];
+ if ($_POST['if']) {
+ $pconfig['interface'] = $_POST['if'];
}
$pconfig['type'] = "pass";
$pconfig['proto'] = "tcp"; // for new blank rules, default=tcp, also ensures ports fields are visible
@@ -303,7 +297,7 @@ if (isset($id) && $a_filter[$id]) {
/* Allow the FloatingRules to work */
$if = $pconfig['interface'];
-if (isset($_GET['dup']) && is_numericint($_GET['dup'])) {
+if (isset($_POST['dup']) && is_numericint($_POST['dup'])) {
unset($id);
}
@@ -313,7 +307,7 @@ read_dummynet_config(); /* XXX: */
$dnqlist =& get_unique_dnqueue_list();
$a_gatewaygroups = return_gateway_groups_array();
-if ($_POST) {
+if ($_POST['save']) {
unset($input_errors);
@@ -1195,7 +1189,7 @@ if ($edit_disabled) {
$extra = '';
foreach ($config['nat']['rule'] as $index => $nat_rule) {
if ($nat_rule['associated-rule-id'] === $pconfig['associated-rule-id']) {
- $extra = '<br/><a href="firewall_nat_edit.php?id='. $index .'">'. gettext('View the NAT rule') .'</a>';
+ $extra = '<br/><a href="firewall_nat_edit.php?id='. $index .'" usepost>'. gettext('View the NAT rule') .'</a>';
}
}
OpenPOWER on IntegriCloud