Fix links to edit pages with non-original zone types

https://github.com/webmin/webmin/issues/2443
This commit is contained in:
Jamie Cameron
2025-03-27 07:22:54 -07:00
parent f3a841d2b9
commit 4ae5ec1694

View File

@@ -26,6 +26,10 @@ foreach my $z (@zones) {
$v eq "." || !&can_edit_zone($z) ||
&arpa_to_ip($v) !~ /\Q$in{'search'}\E/i);
my $t = $z->{'type'};
next if (!$t);
$t = "delegation" if ($t eq "delegation-only");
$t = "master" if ($t eq "primary");
$t = "slave" if ($t eq "secondary");
if ($z->{'view'}) {
push(@zlinks, "edit_$t.cgi?zone=$z->{'name'}".
"&view=$z->{'viewindex'}");