mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
dns.cgi: Show ISP name servers as disabled
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -421,22 +421,22 @@ print <<END;
|
|||||||
END
|
END
|
||||||
|
|
||||||
# Check the usage of ISP assigned nameservers is enabled.
|
# Check the usage of ISP assigned nameservers is enabled.
|
||||||
if ($settings{'USE_ISP_NAMESERVERS'} eq "on") {
|
my $id = 1;
|
||||||
my $id="1";
|
|
||||||
|
|
||||||
# Loop through the array which stores the files.
|
# Loop through the array which stores the files.
|
||||||
foreach my $file (@ISP_nameserver_files) {
|
foreach my $file (@ISP_nameserver_files) {
|
||||||
# Grab the address of the nameserver.
|
# Grab the address of the nameserver.
|
||||||
my $address = &grab_address_from_file($file);
|
my $address = &grab_address_from_file($file);
|
||||||
|
|
||||||
# Check if we got an address.
|
# Check if we got an address.
|
||||||
if ($address) {
|
if ($address) {
|
||||||
# Add the address to the hash of nameservers.
|
# Add the address to the hash of nameservers.
|
||||||
$dns_servers{$id} = [ "$address", "none", "enabled", "$Lang::tr{'dns isp assigned nameserver'}" ];
|
$dns_servers{$id} = [ "$address", "none",
|
||||||
|
($settings{'USE_ISP_NAMESERVERS'} eq "on") ? "enabled" : "disabled",
|
||||||
|
"$Lang::tr{'dns isp assigned nameserver'}" ];
|
||||||
|
|
||||||
# Increase id by one.
|
# Increase id by one.
|
||||||
$id++;
|
$id++;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -524,6 +524,11 @@ END
|
|||||||
|
|
||||||
if (!$rdns) { $rdns = $Lang::tr{'lookup failed'}; }
|
if (!$rdns) { $rdns = $Lang::tr{'lookup failed'}; }
|
||||||
|
|
||||||
|
# Mark ISP name servers as disabled
|
||||||
|
if ($id <= 2 && $enabled eq "disabled") {
|
||||||
|
$nameserver = "<del>$nameserver</del>";
|
||||||
|
}
|
||||||
|
|
||||||
print <<END;
|
print <<END;
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" $col>
|
<td align="center" $col>
|
||||||
|
|||||||
Reference in New Issue
Block a user