]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
dns.cgi: Consitently show the legend
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Dec 2025 11:46:22 +0000 (11:46 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Dec 2025 11:46:22 +0000 (11:46 +0000)
Fixes: #13917 - Legend in dns.cgi disappears
Suggested-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/200/filelists/files
html/cgi-bin/dns.cgi

index 5ab36a55e1b4ad6a9a5b3baae1baa8e291dfb1e4..e43c7c7dd19d74040601adda006f916251ebf6c8 100644 (file)
@@ -1,3 +1,4 @@
 etc/rc.d/init.d/networking/red
 etc/rc.d/init.d/unbound
+srv/web/ipfire/cgi-bin/dns.cgi
 srv/web/ipfire/cgi-bin/ovpnmain.cgi
index f01d5d3ab9d81e135a36aff7eb06a8de16332544..e99b2f07821ed4ba05115d55c2adb746d3450099 100644 (file)
@@ -708,10 +708,18 @@ END
 
                print"</table>\n";
 
-               print"<table width='100%'>\n";
+               my $show_legend = 0;
 
                # Check if the usage of the ISP nameservers is enabled and there are more than 2 servers.
-               if (($settings{'USE_ISP_NAMESERVERS'} eq "on") && ($server_amount > 2)) {
+               if ($settings{'USE_ISP_NAMESERVERS'} eq "on") {
+                       $show_legend = $server_amount > 2;
+               } else {
+                       $show_legend = $server_amount > 0;
+               }
+
+               print"<table width='100%'>\n";
+
+               if ($show_legend) {
 print <<END;
                        <tr>
                                <td class='boldbase'>&nbsp; <b>$Lang::tr{'legend'}:</b></td>