Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r481 r483 3998 3998 # - Entity ID and entity type as the primary log "slice" 3999 3999 sub getLogCount { 4000 my $dbh = shift; 4000 my $self = shift; 4001 my $dbh = $self->{dbh}; 4001 4002 4002 4003 my %args = @_; … … 4034 4035 # - offset for pagination 4035 4036 sub getLogEntries { 4036 my $dbh = shift; 4037 my $self = shift; 4038 my $dbh = $self->{dbh}; 4037 4039 4038 4040 my %args = @_; … … 4073 4075 # Get the narrowest template pattern applicable to a passed CIDR address (may be a netblock or an IP) 4074 4076 sub getRevPattern { 4075 my $dbh = shift; 4077 my $self = shift; 4078 my $dbh = $self->{dbh}; 4076 4079 my $cidr = shift; 4077 4080 my $group = shift || 1; # just in case … … 4094 4097 # Returns an arrayref to list of hashrefs perfect for HTML::Template 4095 4098 sub getTypelist { 4096 my $dbh = shift; 4099 my $self = shift; 4100 my $dbh = $self->{dbh}; 4097 4101 my $recgroup = shift; 4098 4102 my $type = shift || $reverse_typemap{A}; … … 5301 5305 # Sends notification mail to recipients regarding a DNSDB operation 5302 5306 sub mailNotify { 5303 my $dbh = shift; 5307 my $self = shift; 5308 my $dbh = $self->{dbh}; 5304 5309 my ($subj,$message) = @_; 5305 5310 -
trunk/dns-rpc.cgi
r481 r483 621 621 _commoncheck(\%args, 'y'); 622 622 623 return DNSDB::getRevPattern($dbh,$args{cidr}, $args{group});623 return $dnsdb->getRevPattern($args{cidr}, $args{group}); 624 624 } 625 625 -
trunk/dns.cgi
r481 r483 365 365 366 366 if ($code eq 'OK') { 367 mailNotify($dbh,"New ".($webvar{makeactive} eq 'on' ? 'Active' : 'Inactive')." Domain Created",367 $dnsdb->mailNotify("New ".($webvar{makeactive} eq 'on' ? 'Active' : 'Inactive')." Domain Created", 368 368 ($webvar{makeactive} eq 'on' ? 'Active' : 'Inactive').qq( domain "$webvar{domain}" added by ). 369 369 $session->param("username")); … … 686 686 $page->param(port => $recdata->{port}); 687 687 $page->param(ttl => $recdata->{ttl}); 688 $page->param(typelist => getTypelist($dbh,$webvar{revrec}, $recdata->{type}));688 $page->param(typelist => $dnsdb->getTypelist($webvar{revrec}, $recdata->{type})); 689 689 690 690 if ($webvar{defrec} eq 'n') { … … 1460 1460 1461 1461 $page->param(qfor => $webvar{qfor}) if $webvar{qfor}; 1462 $page->param(typelist => getTypelist($dbh,'l', ($webvar{type} ? $webvar{type} : undef)));1462 $page->param(typelist => $dnsdb->getTypelist('l', ($webvar{type} ? $webvar{type} : undef))); 1463 1463 $page->param(nrecurse => $webvar{nrecurse}) if $webvar{nrecurse}; 1464 1464 $page->param(resolver => $webvar{resolver}) if $webvar{resolver}; … … 1649 1649 } 1650 1650 $webvar{ltype} = 'group' if !$webvar{ltype}; 1651 my $lcount = getLogCount($dbh, (id => $id, logtype => $webvar{ltype})) or push @debugbits, $DNSDB::errstr;1651 my $lcount = $dnsdb->getLogCount(id => $id, logtype => $webvar{ltype}) or push @debugbits, $dnsdb->errstr; 1652 1652 1653 1653 $page->param(id => $id); … … 1673 1673 1674 1674 ##fixme: increase per-page limit or use separate limit for log? some ops give *lots* of entries... 1675 my $logentries = getLogEntries($dbh,(id => $id, logtype => $webvar{ltype},1676 offset => $webvar{offset}, sortby => $sortby, sortorder => $sortorder) );1675 my $logentries = $dnsdb->getLogEntries(id => $id, logtype => $webvar{ltype}, 1676 offset => $webvar{offset}, sortby => $sortby, sortorder => $sortorder); 1677 1677 $page->param(logentries => $logentries); 1678 1678 … … 1918 1918 1919 1919 sub fill_recdata { 1920 $page->param(typelist => getTypelist($dbh,$webvar{revrec}, $webvar{type}));1920 $page->param(typelist => $dnsdb->getTypelist($webvar{revrec}, $webvar{type})); 1921 1921 1922 1922 # le sigh. we may get called with many empty %webvar keys
Note:
See TracChangeset
for help on using the changeset viewer.