Changeset 439


Ignore:
Timestamp:
11/02/12 13:17:57 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Extend record list filtering to check both host and val columns;
this will make it easier to find entries in large reverse zones.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r436 r439  
    34383438  $sql .= "WHERE "._recparent($args{defrec},$args{revrec})." = ?";
    34393439  $sql .= " AND NOT r.type=$reverse_typemap{SOA}";
    3440   $sql .= " AND host ~* ?" if $args{filter};
     3440  $sql .= " AND (r.host ~* ? OR r.val ~* ?)" if $args{filter};
    34413441  $sql .= " ORDER BY $newsort $args{sortorder}";
    34423442  # ensure consistent ordering by sorting on record_id too
     
    34453445
    34463446  my @bindvars = ($args{id});
    3447   push @bindvars, $args{filter} if $args{filter};
     3447  push @bindvars, ($args{filter},$args{filter}) if $args{filter};
    34483448
    34493449  my $ret = $dbh->selectall_arrayref($sql, { Slice => {} }, (@bindvars) );
Note: See TracChangeset for help on using the changeset viewer.