Changeset 779


Ignore:
Timestamp:
08/09/19 17:16:45 (5 years ago)
Author:
Kris Deugau
Message:

/trunk

Retrieve and return the SOA serial in getSOA()

Also added a utility sub to pick the appropriate zone table based on the
default/revrec flags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r778 r779  
    293293## utility functions
    294294##
     295
     296## DNSDB::_zonetable()
     297# Takes default+rdns flags, returns appropriate zone table name
     298sub _zonetable {
     299  my $def = shift;
     300  my $rev = shift;
     301
     302  return 'domains' if $rev ne 'y';
     303  return 'revzones';
     304} # end _zonetable()
    295305
    296306## DNSDB::_rectable()
     
    41824192  ($ret->{refresh},$ret->{retry},$ret->{expire},$ret->{minttl}) = split /:/, $ret->{val};
    41834193  delete $ret->{val};
     4194
     4195  my ($ser) = $dbh->selectrow_array("SELECT zserial FROM "._zonetable($def,$rev).
     4196        " WHERE "._recparent($def,$rev)." = ?", undef, $id);
     4197  $ret->{serial} = $ser;
    41844198
    41854199  return $ret;
Note: See TracChangeset for help on using the changeset viewer.