Changeset 242
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r240 r242 501 501 return ('WARN', $msg); 502 502 } 503 504 # Add domain ID to field list and values 505 ${$args{fields}} .= "domain_id,"; 506 push @{$args{vallist}}, ${$args{domid}}; 503 507 504 508 } else { -
trunk/dns.cgi
r239 r242 598 598 $page->param(fwdzone => $webvar{revrec} eq 'n'); 599 599 fill_recdata(); # populate the form... er, mostly. 600 $page->param(name => $webvar{name});601 600 if ($config{log_failures}) { 602 601 if ($webvar{defrec} eq 'y') { … … 684 683 } else { 685 684 $page->param(parentid => $webvar{parentid}); 686 $page->param(dohere => domainName($dbh,$webvar{parentid})); 685 $page->param(dohere => domainName($dbh,$webvar{parentid})) if $webvar{revrec} eq 'n'; 686 $page->param(dohere => revName($dbh,$webvar{parentid})) if $webvar{revrec} eq 'y'; 687 687 } 688 688 … … 1812 1812 ##todo: allow BIND-style bare names, ASS-U-ME that the name is within the domain? 1813 1813 # prefill <domain> or DOMAIN in "Host" space for new records 1814 my $domroot = ($webvar{defrec} eq 'y' ? 'DOMAIN' : domainName($dbh,$webvar{parentid})); 1815 $page->param(name => $domroot); 1816 $page->param(address => $webvar{address}); 1817 $page->param(distance => $webvar{distance}) 1814 if ($webvar{revrec} eq 'n') { 1815 my $domroot = ($webvar{defrec} eq 'y' ? 'DOMAIN' : domainName($dbh,$webvar{parentid})); 1816 $page->param(name => $domroot); 1817 $page->param(address => $webvar{address}); 1818 $page->param(distance => $webvar{distance}) 1818 1819 if ($webvar{type} == $reverse_typemap{MX} or $webvar{type} == $reverse_typemap{SRV}); 1819 $page->param(weight => $webvar{weight}) if $webvar{type} == $reverse_typemap{SRV}; 1820 $page->param(port => $webvar{port}) if $webvar{type} == $reverse_typemap{SRV}; 1820 $page->param(weight => $webvar{weight}) if $webvar{type} == $reverse_typemap{SRV}; 1821 $page->param(port => $webvar{port}) if $webvar{type} == $reverse_typemap{SRV}; 1822 } else { 1823 my $domroot = ($webvar{defrec} eq 'y' ? 'ADMINDOMAIN' : ".$config{domain}"); 1824 $page->param(name => ($webvar{name} ? $webvar{name} : $domroot)); 1825 my $zname = ($webvar{defrec} eq 'y' ? 'ZONE' : revName($dbh,$webvar{parentid})); 1826 $zname =~ s|\d*/\d+$||; 1827 $page->param(address => ($webvar{address} ? $webvar{address} : $zname)); 1828 } 1821 1829 # retrieve the right ttl instead of falling (way) back to the hardcoded system default 1822 my %soa = getSOA($dbh,$webvar{defrec},$webvar{ parentid});1830 my %soa = getSOA($dbh,$webvar{defrec},$webvar{revrec},$webvar{parentid}); 1823 1831 $page->param(ttl => ($webvar{ttl} ? $webvar{ttl} : $soa{minttl})); 1824 1832 }
Note:
See TracChangeset
for help on using the changeset viewer.