Changeset 498


Ignore:
Timestamp:
05/05/13 22:41:31 (11 years ago)
Author:
Kris Deugau
Message:

/trunk

Add a line in dns-rpc.cgi's addRec() and updateRec() to allow RPC
callers to use the text labels for DNS types instead of having to
know the underlying integer value. Should work for all types
including the pseudotypes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns-rpc.cgi

    r496 r498  
    389389  _ttlcheck(\%args);
    390390
     391  # allow passing text types rather than DNS integer IDs
     392  $args{type} = $DNSDB::reverse_typemap{$args{type}} if $args{type} !~ /^d+$/;
     393
    391394  my @recargs = ($args{defrec}, $args{revrec}, $args{parent_id},
    392395        \$args{name}, \$args{type}, \$args{address}, $args{ttl}, $args{location});
     
    416419    $args{$field} = $oldrec->{$field} if !$args{$field} && defined($oldrec->{$field});
    417420  }
     421
     422  # allow passing text types rather than DNS integer IDs
     423  $args{type} = $DNSDB::reverse_typemap{$args{type}} if $args{type} !~ /^d+$/;
    418424
    419425  # note dist, weight, port are not required on all types;  will be ignored if not needed.
Note: See TracChangeset for help on using the changeset viewer.