Changeset 970 for branches


Ignore:
Timestamp:
01/08/26 14:42:52 (3 weeks ago)
Author:
Kris Deugau
Message:

/branches/cname-collision

Compact the timestamp check from r968 since it's looking like further
timestamp-related checks will need to go elsewhere anyway, and copy it
into the second section.
See #72, #88

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cname-collision/DNSDB.pm

    r968 r970  
    640640        " WHERE "._recparent($args{defrec}, $args{revrec})." = ? AND type <> 5 AND $hfield = ?";
    641641    if ($args{defrec} eq 'n') {
    642       $sql .= " AND (";
    643642      # Expired records
    644       $sql .= "stampactive = 't' AND (expires = 't' AND stamp >= now())";
    645 
    646       $sql .= ")";
     643      $sql .= " AND (stampactive = 't' AND (expires = 't' AND stamp >= now()))";
    647644    }
    648645    my @lookupargs = ($args{id}, $hcheck);
     
    662659  my $sql = "SELECT count(*) FROM "._rectable($args{defrec}, $args{revrec}).
    663660        " WHERE "._recparent($args{defrec}, $args{revrec})." = ? AND type = 5 AND $hfield = ?";
     661  if ($args{defrec} eq 'n') {
     662    # Expired records
     663    $sql .= " AND (stampactive = 't' AND (expires = 't' AND stamp >= now()))";
     664  }
    664665  my @lookupargs = ($args{id}, $hcheck);
    665666  if ($args{update}) {
Note: See TracChangeset for help on using the changeset viewer.