Changeset 481 for trunk/dns.cgi
- Timestamp:
- 03/14/13 15:33:42 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r480 r481 443 443 444 444 # prepopulate revpatt with the matching default record 445 # getRecByName($dbh, (revrec => $webvar{revrec}, defrec => $webvar{defrec}, host => 'string'));445 # $dnsdb->getRecByName(revrec => $webvar{revrec}, defrec => $webvar{defrec}, host => 'string'); 446 446 447 447 if ($session->param('add_failed')) { … … 543 543 $page->param(curpage => $webvar{page}); 544 544 545 my $count = getRecCount($dbh,$webvar{defrec}, $webvar{revrec}, $webvar{id}, $filter);545 my $count = $dnsdb->getRecCount($webvar{defrec}, $webvar{revrec}, $webvar{id}, $filter); 546 546 547 547 $sortby = 'host'; … … 638 638 $webvar{location} = $parloc unless ($permissions{admin} || $permissions{record_locchg}); 639 639 640 my @recargs = ($ dbh,$webvar{defrec},$webvar{revrec},$webvar{parentid},641 \$webvar{name}, \$webvar{type},\$webvar{address},$webvar{ttl},$webvar{location});640 my @recargs = ($webvar{defrec}, $webvar{revrec}, $webvar{parentid}, 641 \$webvar{name}, \$webvar{type}, \$webvar{address}, $webvar{ttl}, $webvar{location}); 642 642 if ($webvar{type} == $reverse_typemap{MX} or $webvar{type} == $reverse_typemap{SRV}) { 643 643 push @recargs, $webvar{distance}; … … 648 648 } 649 649 650 my ($code,$msg) = addRec(@recargs);650 my ($code,$msg) = $dnsdb->addRec(@recargs); 651 651 652 652 if ($code eq 'OK' || $code eq 'WARN') { … … 679 679 $page->param(parentid => $webvar{parentid}); 680 680 $page->param(id => $webvar{id}); 681 my $recdata = getRecLine($dbh,$webvar{defrec}, $webvar{revrec}, $webvar{id});681 my $recdata = $dnsdb->getRecLine($webvar{defrec}, $webvar{revrec}, $webvar{id}); 682 682 $page->param(name => $recdata->{host}); 683 683 $page->param(address => $recdata->{val}); … … 698 698 699 699 # retain old location if user doesn't have permission to fiddle locations 700 my $oldrec = getRecLine($dbh,$webvar{defrec}, $webvar{revrec}, $webvar{id});700 my $oldrec = $dnsdb->getRecLine($webvar{defrec}, $webvar{revrec}, $webvar{id}); 701 701 $webvar{location} = $oldrec->{location} unless ($permissions{admin} || $permissions{record_locchg}); 702 702 703 my ($code,$msg) = updateRec($dbh,$webvar{defrec},$webvar{revrec},$webvar{id},$webvar{parentid},704 \$webvar{name}, \$webvar{type},\$webvar{address},$webvar{ttl},$webvar{location},705 $webvar{distance}, $webvar{weight},$webvar{port});703 my ($code,$msg) = $dnsdb->updateRec($webvar{defrec}, $webvar{revrec}, $webvar{id}, $webvar{parentid}, 704 \$webvar{name}, \$webvar{type}, \$webvar{address}, $webvar{ttl}, $webvar{location}, 705 $webvar{distance}, $webvar{weight}, $webvar{port}); 706 706 707 707 if ($code eq 'OK' || $code eq 'WARN') { … … 756 756 if (!defined($webvar{del})) { 757 757 $page->param(del_getconf => 1); 758 my $rec = getRecLine($dbh,$webvar{defrec}, $webvar{revrec}, $webvar{id});758 my $rec = $dnsdb->getRecLine($webvar{defrec}, $webvar{revrec}, $webvar{id}); 759 759 $page->param(host => $rec->{host}); 760 760 $page->param(ftype => $typemap{$rec->{type}}); 761 761 $page->param(recval => $rec->{val}); 762 762 } elsif ($webvar{del} eq 'ok') { 763 my ($code,$msg) = delRec($dbh,$webvar{defrec}, $webvar{revrec}, $webvar{id});763 my ($code,$msg) = $dnsdb->delRec($webvar{defrec}, $webvar{revrec}, $webvar{id}); 764 764 if ($code eq 'OK') { 765 765 changepage(page => "reclist", id => $webvar{parentid}, defrec => $webvar{defrec}, … … 816 816 unless ($permissions{admin} || $permissions{domain_edit}); 817 817 818 my ($code, $msg) = updateSOA($dbh,$webvar{defrec}, $webvar{revrec},818 my ($code, $msg) = $dnsdb->updateSOA($webvar{defrec}, $webvar{revrec}, 819 819 (contact => $webvar{contact}, prins => $webvar{prins}, refresh => $webvar{refresh}, 820 820 retry => $webvar{retry}, expire => $webvar{expire}, minttl => $webvar{minttl}, … … 1863 1863 if ($preserve eq 'd') { 1864 1864 # there are probably better ways to do this. TMTOWTDI. 1865 my $soa = getSOA($dbh,$defrec,$revrec,$id);1865 my $soa = $dnsdb->getSOA($defrec, $revrec, $id); 1866 1866 1867 1867 $page->param(prins => ($soa->{prins} ? $soa->{prins} : $DNSDB::def{prins})); … … 1889 1889 1890 1890 # get the SOA first 1891 my $soa = getSOA($dbh,$def,$rev,$id);1891 my $soa = $dnsdb->getSOA($def, $rev, $id); 1892 1892 1893 1893 $page->param(contact => $soa->{contact}); … … 1899 1899 $page->param(ttl => $soa->{ttl}); 1900 1900 1901 my $foo2 = getDomRecs($dbh,(defrec => $def, revrec => $rev, id => $id, offset => $webvar{offset},1902 sortby => $sortby, sortorder => $sortorder, filter => $filter) );1901 my $foo2 = $dnsdb->getDomRecs(defrec => $def, revrec => $rev, id => $id, offset => $webvar{offset}, 1902 sortby => $sortby, sortorder => $sortorder, filter => $filter); 1903 1903 1904 1904 foreach my $rec (@$foo2) { … … 1941 1941 } 1942 1942 # retrieve the right ttl instead of falling (way) back to the hardcoded system default 1943 my $soa = getSOA($dbh,$webvar{defrec},$webvar{revrec},$webvar{parentid});1943 my $soa = $dnsdb->getSOA($webvar{defrec}, $webvar{revrec}, $webvar{parentid}); 1944 1944 $page->param(ttl => ($webvar{ttl} ? $webvar{ttl} : $soa->{minttl})); 1945 1945 }
Note:
See TracChangeset
for help on using the changeset viewer.