Changeset 225 for trunk/dns.cgi
- Timestamp:
- 01/26/12 14:58:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r224 r225 601 601 $page->param(port => $recdata->{port}); 602 602 $page->param(ttl => $recdata->{ttl}); 603 fill_rectypes($recdata->{type});603 $page->param(typelist => getTypelist($dbh, $webvar{revrec}, $webvar{type})); 604 604 605 605 } elsif ($webvar{recact} eq 'update') { … … 1384 1384 1385 1385 $page->param(qfor => $webvar{qfor}) if $webvar{qfor}; 1386 fill_rectypes($webvar{type} ? $webvar{type} : '', 1);1386 $page->param(typelist => getTypelist($dbh, 'l', ($webvar{type} ? $webvar{type} : undef))); 1387 1387 $page->param(nrecurse => $webvar{nrecurse}) if $webvar{nrecurse}; 1388 1388 $page->param(resolver => $webvar{resolver}) if $webvar{resolver}; … … 1778 1778 } 1779 1779 1780 # fill in record type list on add/update/edit record template1781 sub fill_rectypes {1782 my $type = shift || $reverse_typemap{A};1783 my $soaflag = shift || 0;1784 1785 my $sth = $dbh->prepare("SELECT val,name FROM rectypes WHERE stdflag=1 ORDER BY listorder");1786 $sth->execute;1787 my @typelist;1788 while (my ($rval,$rname) = $sth->fetchrow_array()) {1789 my %row = ( recval => $rval, recname => $rname );1790 $row{tselect} = 1 if $rval == $type;1791 push @typelist, \%row;1792 }1793 if ($soaflag) {1794 my %row = ( recval => $reverse_typemap{SOA}, recname => 'SOA' );1795 $row{tselect} = 1 if $reverse_typemap{SOA} == $type;1796 push @typelist, \%row;1797 }1798 $page->param(typelist => \@typelist);1799 } # fill_rectypes1800 1801 1780 sub fill_recdata { 1802 fill_rectypes($webvar{type});1781 $page->param(typelist => getTypelist($dbh, $webvar{revrec}, $webvar{type})); 1803 1782 1804 1783 # le sigh. we may get called with many empty %webvar keys
Note:
See TracChangeset
for help on using the changeset viewer.