ids.cgi: Hack to use the correct language string for red network zone.

This hack is needed because "red" is used as "internet" in the language files
and "red1" contains the correct "red" translations.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2018-12-24 13:19:06 +01:00
parent 99b372b51d
commit 53817b89c0

View File

@@ -789,6 +789,14 @@ foreach my $zone (@network_zones) {
# Convert current zone name to upper case.
my $zone_upper = uc($zone);
# Set zone name.
my $zone_name = $zone;
# Dirty hack to get the correct language string for the red zone.
if ($zone eq "red") {
$zone_name = "red1";
}
# Grab checkbox status from settings hash.
if ($idssettings{"ENABLE_IDS_$zone_upper"} eq "on") {
$checked_input = "checked = 'checked'";
@@ -796,7 +804,7 @@ foreach my $zone (@network_zones) {
print "<td class='base' width='25%'>\n";
print "<input type='checkbox' name='ENABLE_IDS_$zone_upper' $checked_input>\n";
print "&nbsp$Lang::tr{'enabled on'}<font color='$colourhash{$zone}'> $Lang::tr{$zone}</font>\n";
print "&nbsp$Lang::tr{'enabled on'}<font color='$colourhash{$zone}'> $Lang::tr{$zone_name}</font>\n";
print "</td>\n";
}