Changeset 583 for trunk/dns.cgi
- Timestamp:
- 01/03/14 14:58:09 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r581 r583 2004 2004 2005 2005 foreach my $rec (@$foo2) { 2006 # NS records. Need to do this first before we convert the type-value to the text representation2007 if ($rev eq 'y' && $dnsdb->{showrec_arpa_ns} && $rec->{type} == $reverse_typemap{NS}) {2008 my $tmp = new NetAddr::IP $rec->{val};2009 $rec->{val} = DNSDB::_ZONE($tmp, 'ZONE', 'r', '.').($tmp->{isv6} ? '.ip6.arpa' : '.in-addr.arpa');2010 }2011 2006 $rec->{type} = $typemap{$rec->{type}}; 2012 2007 $rec->{fwdzone} = $rev eq 'n'; … … 2034 2029 2035 2030 sub fill_recdata { 2036 $page->param(typelist => $dnsdb->getTypelist($webvar{revrec}, $webvar{type})); 2037 2038 # le sigh. we may get called with many empty %webvar keys 2031 # le sigh. we may get called with many empty %webvar keys 2039 2032 no warnings qw( uninitialized ); 2040 2033 … … 2042 2035 # prefill <domain> or DOMAIN in "Host" space for new records 2043 2036 if ($webvar{revrec} eq 'n') { 2037 $page->param(typelist => $dnsdb->getTypelist($webvar{revrec}, $webvar{type})); 2044 2038 my $domroot = ($webvar{defrec} eq 'y' ? 'DOMAIN' : $dnsdb->domainName($webvar{parentid})); 2045 2039 $page->param(name => ($webvar{name} ? $webvar{name} : $domroot)); … … 2052 2046 my $domroot = ($webvar{defrec} eq 'y' ? 'ADMINDOMAIN' : ".$dnsdb->{domain}"); 2053 2047 $page->param(name => ($webvar{name} ? $webvar{name} : $domroot)); 2054 my $zname = ($webvar{defrec} eq 'y' ? 'ZONE' : $dnsdb->revName($webvar{parentid})); 2048 my $zname = ($webvar{defrec} eq 'y' ? 'ZONE' : $dnsdb->revName($webvar{parentid}, 'y')); 2049 my $cidr = new NetAddr::IP $zname; 2055 2050 $zname =~ s|\d*/\d+$||; 2056 2051 $page->param(address => ($webvar{address} ? $webvar{address} : $zname)); 2052 $page->param(typelist => $dnsdb->getTypelist($webvar{revrec}, 2053 $webvar{type} || ($cidr->{isv6} ? $reverse_typemap{'AAAA+PTR'} : $reverse_typemap{'A+PTR'}))); 2057 2054 } 2058 2055 # retrieve the right ttl instead of falling (way) back to the hardcoded system default … … 2183 2180 ); 2184 2181 # probably don't need this, keeping for reference for now 2185 # foreach (@$zonelist) {2182 # foreach my $rec (@$zonelist) { 2186 2183 # } 2187 2184 $page->param(domtable => $zonelist);
Note:
See TracChangeset
for help on using the changeset viewer.