summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-01-24 14:37:33 -0500
committerStephen Beaver <sbeaver@netgate.com>2016-01-24 14:37:33 -0500
commita2c5280d92c2707c27cbef318b1ced7122c32b0e (patch)
tree04763c7e6105a91b4d9230fb6a6b17fbf1f0f25a /src/usr/local/www
parent055375927e013fb9227ea48cc7b2c3f7491fe33d (diff)
downloadpfsense-a2c5280d92c2707c27cbef318b1ced7122c32b0e.zip
pfsense-a2c5280d92c2707c27cbef318b1ced7122c32b0e.tar.gz
Fixed #5810
Diffstat (limited to 'src/usr/local/www')
-rw-r--r--src/usr/local/www/firewall_rules.php39
1 files changed, 29 insertions, 10 deletions
diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php
index 470a917..d7e5b20 100644
--- a/src/usr/local/www/firewall_rules.php
+++ b/src/usr/local/www/firewall_rules.php
@@ -282,6 +282,24 @@ if (is_subsystem_dirty('filter')) {
display_top_tabs($tab_array);
+$showantilockout = false;
+$showprivate = false;
+$showblockbogons = false;
+
+if (!isset($config['system']['webgui']['noantilockout']) &&
+ (((count($config['interfaces']) > 1) && ($if == 'lan')) ||
+ ((count($config['interfaces']) == 1) && ($if == 'wan')))) {
+ $showantilockout = true;
+}
+
+if (isset($config['interfaces'][$if]['blockpriv'])) {
+ $showprivate = true;
+}
+
+if (isset($config['interfaces'][$if]['blockbogons'])) {
+ $showblockbogons = true;
+}
+
?>
<form method="post">
<div class="panel panel-default">
@@ -304,13 +322,14 @@ display_top_tabs($tab_array);
<th><?=gettext("Actions")?></th>
</tr>
</thead>
+
+<?php if ($showblockbogons || $showantilockout || $showprivate) :
+?>
<tbody>
<?php
// Show the anti-lockout rule if it's enabled, and we are on LAN with an if count > 1, or WAN with an if count of 1.
- if (!isset($config['system']['webgui']['noantilockout']) &&
- (((count($config['interfaces']) > 1) && ($if == 'lan')) ||
- ((count($config['interfaces']) == 1) && ($if == 'wan')))):
- $alports = implode('<br />', filter_get_antilockout_ports(true));
+ if ($showantilockout):
+ $alports = implode('<br />', filter_get_antilockout_ports(true));
?>
<tr id="antilockout">
<td></td>
@@ -328,8 +347,8 @@ display_top_tabs($tab_array);
<a href="system_advanced_admin.php" title="<?=gettext("Settings");?>"><i class="fa fa-cog"></i></a>
</td>
</tr>
-<?php endif;?>
-<?php if (isset($config['interfaces'][$if]['blockpriv'])): ?>
+<?php endif;?>
+<?php if ($showprivate): ?>
<tr id="frrfc1918">
<td></td>
<td title="<?=gettext("traffic is blocked")?>"><i class="fa fa-times text-danger"></i></td>
@@ -346,8 +365,8 @@ display_top_tabs($tab_array);
<a href="interfaces.php?if=<?=htmlspecialchars($if)?>" title="<?=gettext("Settings");?>"><i class="fa fa-cog"></i></a>
</td>
</tr>
-<?php endif;?>
-<?php if (isset($config['interfaces'][$if]['blockbogons'])): ?>
+<?php endif;?>
+<?php if ($showblockbogons): ?>
<tr id="frrfc1918">
<td></td>
<td title="<?=gettext("traffic is blocked")?>"><i class="fa fa-times text-danger"></i></td>
@@ -364,9 +383,9 @@ display_top_tabs($tab_array);
<a href="interfaces.php?if=<?=htmlspecialchars($if)?>" title="<?=gettext("Settings");?>"><i class="fa fa-cog"></i></a>
</td>
</tr>
-<?php endif;?>
+<?php endif;?>
</tbody>
-
+<?php endif;?>
<tbody class="user-entries">
<?php
$nrules = 0;
OpenPOWER on IntegriCloud