Changeset 447


Ignore:
Timestamp:
01/04/13 17:08:30 (11 years ago)
Author:
Kris Deugau
Message:

/trunk

Tweak RPC handler for updated addRDNS().
Add and fill in getLocDropdown() in RPC handler so that callers
can retrieve a list of locations to pass back when adding or changing
records and reverse zones.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns-rpc.cgi

    r426 r447  
    5656        'dnsdb.updateUser'      => \&updateUser,
    5757        'dnsdb.delUser'         => \&delUser,
     58        'dnsdb.getLocDropdown'  => \&getLocDropdown,
    5859        'dnsdb.getSOA'          => \&getSOA,
    5960        'dnsdb.getRecLine'      => \&getRecLine,
     
    160161  _commoncheck(\%args, 'y');
    161162
    162   my ($code, $msg) = DNSDB::addRDNS($dbh, $args{revzone}, $args{revpatt}, $args{group}, $args{state});
    163   die $msg if $code eq 'FAIL';
     163  my ($code, $msg) = DNSDB::addRDNS($dbh, $args{revzone}, $args{revpatt}, $args{group}, $args{state}, $args{defloc});
     164  die "$msg\n" if $code eq 'FAIL';
    164165  return $msg;  # domain ID
    165166}
     
    279280#sub getLocCount {}
    280281#sub getLocList {}
    281 #sub getLocDropdown {}
     282
     283sub getLocDropdown {
     284  my %args = @_;
     285
     286  _commoncheck(\%args);
     287  $args{defloc} = '' if !$args{defloc};
     288
     289  my $ret = DNSDB::getLocDropdown($dbh, $args{group}, $args{defloc});
     290  return $ret;
     291}
    282292
    283293sub getSOA {
Note: See TracChangeset for help on using the changeset viewer.