Changeset 475


Ignore:
Timestamp:
03/13/13 12:49:20 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Fix a couple of error-log-polluters. See #25.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r474 r475  
    22582258  my @zonelist;
    22592259
    2260   $args{sortorder} = 'ASC' if !grep /^$args{sortorder}$/, ('ASC','DESC');
     2260  $args{sortorder} = 'ASC' if !$args{sortorder} || !grep /^$args{sortorder}$/, ('ASC','DESC');
    22612261  $args{offset} = 0 if !$args{offset} || $args{offset} !~ /^(?:all|\d+)$/;
    22622262
     
    22702270  # Not as compact, and fix-me-twice if the common bits get wrong, but much easier to read
    22712271  if ($args{revrec} eq 'n') {
    2272     $args{sortby} = 'domain' if !grep /^$args{sortby}$/, ('domain','group','status');
     2272    $args{sortby} = 'domain' if !$args{sortby} || !grep /^$args{sortby}$/, ('domain','group','status');
    22732273    $sql = "SELECT domain_id,domain,status,groups.group_name AS group FROM domains".
    22742274        " INNER JOIN groups ON domains.group_id=groups.group_id".
     
    22782278  } else {
    22792279##fixme:  arguably startwith here is irrelevant.  depends on the UI though.
    2280     $args{sortby} = 'revnet' if !grep /^$args{sortby}$/, ('revnet','group','status');
     2280    $args{sortby} = 'revnet' if !$args{sortby} || !grep /^$args{sortby}$/, ('revnet','group','status');
    22812281    $sql = "SELECT rdns_id,revnet,status,groups.group_name AS group FROM revzones".
    22822282        " INNER JOIN groups ON revzones.group_id=groups.group_id".
Note: See TracChangeset for help on using the changeset viewer.