Commit 31e16746 authored by Franco Fichtner's avatar Franco Fichtner

firewall: how many times is this hardcoded? :)

parent 78af5556
...@@ -263,8 +263,8 @@ $( document ).ready(function() { ...@@ -263,8 +263,8 @@ $( document ).ready(function() {
<tbody> <tbody>
<?php if (isset($config['interfaces']['lan'])) { <?php if (isset($config['interfaces']['lan'])) {
$lockout_intf_name = empty($config['interfaces']['lan']['descr']) ? "LAN" :$config['interfaces']['lan']['descr']; $lockout_intf_name = empty($config['interfaces']['lan']['descr']) ? "LAN" :$config['interfaces']['lan']['descr'];
} elseif (isset($config['interfaces']['wan'])) { } elseif (count($config['interfaces']) == 1 && isset($config['interfaces']['wan'])) {
$lockout_intf_name = empty($config['interfaces']['lan']['descr']) ? "WAN" :$config['interfaces']['lan']['descr']; $lockout_intf_name = empty($config['interfaces']['wan']['descr']) ? "WAN" :$config['interfaces']['wan']['descr'];
} else { } else {
$lockout_intf_name = null; $lockout_intf_name = null;
} }
......
...@@ -317,8 +317,7 @@ $( document ).ready(function() { ...@@ -317,8 +317,7 @@ $( document ).ready(function() {
endif; ?> endif; ?>
<?php <?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. // 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']) && if (!isset($config['system']['webgui']['noantilockout']) && ($selected_if == 'lan'
(((count($config['interfaces']) > 1) && ($selected_if == 'lan'))
|| ((count($config['interfaces']) == 1) && ($selected_if == 'wan')))): || ((count($config['interfaces']) == 1) && ($selected_if == 'wan')))):
$alports = implode('<br />', filter_core_antilockout_ports()); $alports = implode('<br />', filter_core_antilockout_ports());
?> ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment