Changeset 477 for trunk/dns-rpc.cgi
- Timestamp:
- 03/13/13 17:10:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns-rpc.cgi
r476 r477 114 114 my $argref = shift; 115 115 if (!$argref->{location} && $argref->{defrec} eq 'n') { 116 $argref->{location} = DNSDB::getZoneLocation($dbh,$argref->{revrec}, $argref->{parent_id});116 $argref->{location} = $dnsdb->getZoneLocation($argref->{revrec}, $argref->{parent_id}); 117 117 } 118 118 } … … 142 142 _commoncheck(\%args, 'y'); 143 143 144 my ($code, $msg) = DNSDB::addDomain($dbh,$args{domain}, $args{group}, $args{state});144 my ($code, $msg) = $dnsdb->addDomain($args{domain}, $args{group}, $args{state}); 145 145 die $msg if $code eq 'FAIL'; 146 146 return $msg; # domain ID … … 156 156 # Let's be nice; delete based on zone id OR zone name. Saves an RPC call round-trip, maybe. 157 157 if ($args{zone} =~ /^\d+$/) { 158 ($code,$msg) = DNSDB::delZone($dbh,$args{zone}, $args{revrec});158 ($code,$msg) = $dnsdb->delZone($args{zone}, $args{revrec}); 159 159 } else { 160 160 my $zoneid; 161 $zoneid = DNSDB::domainID($dbh,$args{zone}) if $args{revrec} eq 'n';162 $zoneid = DNSDB::revID($dbh,$args{zone}) if $args{revrec} eq 'y';163 die "Can't find zone: $ DNSDB::errstr\n" if !$zoneid;164 ($code,$msg) = DNSDB::delZone($dbh,$zoneid, $args{revrec});161 $zoneid = $dnsdb->domainID($args{zone}) if $args{revrec} eq 'n'; 162 $zoneid = $dnsdb->revID($args{zone}) if $args{revrec} eq 'y'; 163 die "Can't find zone: $dnsdb->errstr\n" if !$zoneid; 164 ($code,$msg) = $dnsdb->delZone($zoneid, $args{revrec}); 165 165 } 166 166 die $msg if $code eq 'FAIL'; … … 178 178 _commoncheck(\%args, 'y'); 179 179 180 my ($code, $msg) = DNSDB::addRDNS($dbh,$args{revzone}, $args{revpatt}, $args{group}, $args{state}, $args{defloc});180 my ($code, $msg) = $dnsdb->addRDNS($args{revzone}, $args{revpatt}, $args{group}, $args{state}, $args{defloc}); 181 181 die "$msg\n" if $code eq 'FAIL'; 182 182 return $msg; # domain ID … … 431 431 my $cidr = new NetAddr::IP $args{cidr}; 432 432 433 my $zonelist = DNSDB::getZonesByCIDR($dbh,%args);433 my $zonelist = $dnsdb->getZonesByCIDR(%args); 434 434 if (scalar(@$zonelist) == 0) { 435 435 # enhh.... WTF? … … 511 511 512 512 # much like addOrUpdateRevRec() 513 my $zonelist = DNSDB::getZonesByCIDR($dbh,%args);513 my $zonelist = $dnsdb->getZonesByCIDR(%args); 514 514 my $cidr = new NetAddr::IP $args{cidr}; 515 515 … … 633 633 _commoncheck(\%args, 'y'); 634 634 635 my @arglist = ($ dbh, $args{zoneid});635 my @arglist = ($args{zoneid}); 636 636 push @arglist, $args{status} if defined($args{status}); 637 637 638 my $status = DNSDB::zoneStatus(@arglist);638 my $status = $dnsdb->zoneStatus(@arglist); 639 639 } 640 640 … … 645 645 _commoncheck(\%args, 'y'); 646 646 647 return DNSDB::getZonesByCIDR($dbh,%args);647 return $dnsdb->getZonesByCIDR(%args); 648 648 } 649 649
Note:
See TracChangeset
for help on using the changeset viewer.