Changeset 448 for trunk


Ignore:
Timestamp:
01/10/13 17:16:29 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Minor bugfix for record updates; default records do not have
locations, so don't try to update their location

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r446 r448  
    36923692  # Set up database fields and bind parameters.  Note only the optional fields
    36933693  # (distance, weight, port, secondary parent ID) are added in the validation call above
    3694   $fields .= "host,type,val,ttl,location,"._recparent($defrec,$revrec);
    3695   push @vallist, ($$host,$$rectype,$$val,$ttl,$location,
     3694  $fields .= "host,type,val,ttl,"._recparent($defrec,$revrec);
     3695  push @vallist, ($$host,$$rectype,$$val,$ttl,
    36963696        ($defrec eq 'y' ? $oldrec->{group_id} : ($revrec eq 'n' ? $oldrec->{domain_id} : $oldrec->{rdns_id})) );
     3697
     3698  # locations are not for default records, silly coder!
     3699  if ($defrec eq 'n') {
     3700    $fields .= ",location";
     3701    push @vallist, $location;
     3702  }
    36973703
    36983704  # hack hack PTHUI
Note: See TracChangeset for help on using the changeset viewer.