Changeset 506 for trunk


Ignore:
Timestamp:
05/07/13 13:46:07 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Add and flesh out RPC getTypelist().
Add an extra bit of flag-overloading in the DNSDB.pm's getTypelist(), so

that a caller can retrieve *only* true forward zone types instead of
including the forward+reverse pseudotypes as well.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r501 r506  
    41154115    # default;  forward zone types.  technically $type eq 'f' but not worth the error message.
    41164116    $sql .= "stdflag=1 OR stdflag=2";
     4117    $sql .= " AND val < 65280" if $recgroup eq 'fo';  # An extra flag to trim off the pseudotypes as well.
    41174118  }
    41184119  $sql .= " ORDER BY listorder";
  • trunk/dns-rpc.cgi

    r505 r506  
    6363#sub getLogEntries {}
    6464        'dnsdb.getRevPattern'   => \&getRevPattern,
    65 #sub getTypelist {}
     65        'dnsdb.getTypelist'     => \&getTypelist,
    6666        'dnsdb.getTypemap'      => \&getTypemap,
    6767        'dnsdb.getReverse_typemap'      => \&getReverse_typemap,
     
    666666}
    667667
    668 #sub getTypelist {}
     668sub getTypelist {
     669  my %args = @_;
     670  _commoncheck(\%args, 'y');
     671
     672  $args{selected} = $reverse_typemap{A} if !$args{selected};
     673
     674  return $dnsdb->getTypelist($args{recgroup}, $args{selected});
     675}
    669676
    670677sub getTypemap {
Note: See TracChangeset for help on using the changeset viewer.