From: Michael Tremer Date: Tue, 9 Dec 2025 11:46:22 +0000 (+0000) Subject: dns.cgi: Consitently show the legend X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5489d3994a93f95e4e85bf5cdc711b6b0eef01ca;p=ipfire-2.x.git dns.cgi: Consitently show the legend Fixes: #13917 - Legend in dns.cgi disappears Suggested-by: Bernhard Bitsch Signed-off-by: Michael Tremer --- diff --git a/config/rootfiles/core/200/filelists/files b/config/rootfiles/core/200/filelists/files index 5ab36a55e..e43c7c7dd 100644 --- a/config/rootfiles/core/200/filelists/files +++ b/config/rootfiles/core/200/filelists/files @@ -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 diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi index f01d5d3ab..e99b2f078 100644 --- a/html/cgi-bin/dns.cgi +++ b/html/cgi-bin/dns.cgi @@ -708,10 +708,18 @@ END print"\n"; - print"\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"
\n"; + + if ($show_legend) { print <
  $Lang::tr{'legend'}: