]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
ids.cgi: Hack to use the correct language string for red network zone.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 24 Dec 2018 12:19:06 +0000 (13:19 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Mon, 24 Dec 2018 12:19:06 +0000 (13:19 +0100)
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>
html/cgi-bin/ids.cgi

index df8810a0bf2403053a107b6fd2bab10d017b693d..e3643f24cce6e5edce5fc3b6c5fca56012541a4e 100644 (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";
 }