diff --git a/src/www/firewall_rules.php b/src/www/firewall_rules.php
index d7f797066..9f099c269 100644
--- a/src/www/firewall_rules.php
+++ b/src/www/firewall_rules.php
@@ -267,15 +267,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
}
}
+$selected_if = 'FloatingRules';
if (isset($_GET['if'])) {
$selected_if = htmlspecialchars($_GET['if']);
-} else {
- $selected_if = "FloatingRules";
}
+
+$selected_category = [];
if (isset($_GET['category'])) {
$selected_category = !is_array($_GET['category']) ? array($_GET['category']) : $_GET['category'];
-} else {
- $selected_category = array();
}
include("head.inc");
@@ -778,26 +777,22 @@ $( document ).ready(function() {
+
+?>
-
-
-
-
-
-
+
+
+
+
- = gettext('No interfaces rules are currently defined. All incoming connections ' .
- 'on this interface will be blocked until you add a pass rule.') ?>
+ = sprintf(gettext('No %s rules are currently defined. All incoming connections ' .
+ 'on this interface will be blocked until you add a pass rule.'),
+ !empty($config['interfaces'][$selected_if]['descr']) ?
+ $config['interfaces'][$selected_if]['descr'] : strtoupper($selected_if)) ?>
@@ -901,19 +898,20 @@ $( document ).ready(function() {
-
- =gettext("Rules are evaluated on a first-match basis (i.e. " .
- "the action of the first rule to match a packet will be executed). " .
- "This means that if you use block rules, you'll have to pay attention " .
- "to the rule order. Everything that isn't explicitly passed is blocked " .
- "by default. ");?>
-
- =gettext("Floating rules are evaluated on a first-match basis (i.e. " .
- "the action of the first rule to match a packet will be executed) only " .
- "if the 'quick' option is checked on a rule. Otherwise they will only apply if no " .
- "other rules match. Pay close attention to the rule order and options " .
- "chosen. If no rule here matches, the per-interface or default rules are used. ");?>
-
+
+ = sprintf(gettext('%s rules are evaluated on a first-match basis (i.e. ' .
+ 'the action of the first rule to match a packet will be executed). ' .
+ 'This means that if you use block rules, you will have to pay attention ' .
+ 'to the rule order. Everything that is not explicitly passed is blocked ' .
+ 'by default.'), !empty($config['interfaces'][$selected_if]['descr']) ?
+ $config['interfaces'][$selected_if]['descr'] : strtoupper($selected_if)) ?>
+
+ = gettext('Floating rules are evaluated on a first-match basis (i.e. ' .
+ 'the action of the first rule to match a packet will be executed) only ' .
+ 'if the "quick" option is checked on a rule. Otherwise they will only apply if no ' .
+ 'other rules match. Pay close attention to the rule order and options ' .
+ 'chosen. If no rule here matches, the per-interface or default rules are used.') ?>
+