summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_nat.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-12-14 23:18:15 +0545
committerPhil Davis <phil.davis@inf.org>2015-12-14 23:18:15 +0545
commit67c2baf157c50ae1b545f36bcf6afee6cdf6f67c (patch)
treec429615f87c26b3da9c58c7149d827a893461dbe /src/usr/local/www/firewall_nat.php
parent935b578b7606b8af6866c3c01e9e7b7f9c58a0d9 (diff)
downloadpfsense-67c2baf157c50ae1b545f36bcf6afee6cdf6f67c.zip
pfsense-67c2baf157c50ae1b545f36bcf6afee6cdf6f67c.tar.gz
Coe style firewall *
Diffstat (limited to 'src/usr/local/www/firewall_nat.php')
-rw-r--r--src/usr/local/www/firewall_nat.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/usr/local/www/firewall_nat.php b/src/usr/local/www/firewall_nat.php
index e89e934..6c856a5 100644
--- a/src/usr/local/www/firewall_nat.php
+++ b/src/usr/local/www/firewall_nat.php
@@ -79,18 +79,20 @@ if (!is_array($config['nat']['rule'])) {
$a_nat = &$config['nat']['rule'];
/* update rule order, POST[rule] is an array of ordered IDs */
-if(array_key_exists('order-store', $_POST)) {
+if (array_key_exists('order-store', $_POST)) {
if (is_array($_POST['rule']) && !empty($_POST['rule'])) {
$a_nat_new = array();
// if a rule is not in POST[rule], it has been deleted by the user
- foreach ($_POST['rule'] as $id)
+ foreach ($_POST['rule'] as $id) {
$a_nat_new[] = $a_nat[$id];
+ }
$a_nat = $a_nat_new;
- if (write_config())
+ if (write_config()) {
mark_subsystem_dirty('filter');
+ }
header("Location: firewall_nat.php");
exit;
@@ -171,12 +173,14 @@ $closehead = false;
$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("Port Forward"));
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('natconf'))
+if (is_subsystem_dirty('natconf')) {
print_info_box_np(gettext('The NAT configuration has been changed.') . '<br />' .
gettext('You must apply the changes in order for them to take effect.') . '<br />');
+}
$tab_array = array();
$tab_array[] = array(gettext("Port Forward"), true, "firewall_nat.php");
@@ -222,8 +226,9 @@ foreach ($a_nat as $natent):
);
/* if user does not have access to edit an interface skip on to the next record */
- if (!have_natpfruleint_access($natent['interface']))
+ if (!have_natpfruleint_access($natent['interface'])) {
continue;
+ }
?>
<tr id="fr<?=$nnats;?>" onClick="fr_toggle(<?=$nnats;?>)" ondblclick="document.location='firewall_nat_edit.php?id=<?=$i;?>';">
@@ -246,10 +251,11 @@ foreach ($a_nat as $natent):
<td>
<?=$textss?>
<?php
- if (!$natent['interface'])
+ if (!$natent['interface']) {
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan"));
- else
+ } else {
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface']));
+ }
?>
<?=$textse?>
</td>
OpenPOWER on IntegriCloud