From 53817b89c0eb5f03830777982c86c58e4c097fa6 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Mon, 24 Dec 2018 13:19:06 +0100 Subject: [PATCH] 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 --- html/cgi-bin/ids.cgi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index df8810a0bf..e3643f24cc 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -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 "\n"; print "\n"; - print " $Lang::tr{'enabled on'} $Lang::tr{$zone}\n"; + print " $Lang::tr{'enabled on'} $Lang::tr{$zone_name}\n"; print "\n"; } -- 2.39.2