Show
Ignore:
Timestamp:
04/03/08 18:22:41 (20 months ago)
Author:
mpaschal
Message:

Search all kinds of entries when searching entries
BugzID: 75420

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-33/lib/MT/Object.pm

    r1608 r1757  
    277277    } 
    278278    elsif (ref $terms eq 'ARRAY') { 
     279        if (my @class_terms = grep { ref $_ eq 'HASH' && 1 == scalar keys %$_ && $_->{$col} } @$terms) { 
     280            # Filter out any unlimiting class terms (class = *). 
     281            @$terms = grep { ref $_ ne 'HASH' || 1 != scalar keys %$_ || !$_->{$col} || $_->{$col} ne '*' } @$terms; 
     282 
     283            # The class column has been explicitly given or removed, so don't 
     284            # add one. 
     285            return; 
     286        } 
    279287        @$terms = ( { $col => $props->{class_type} } => 'AND' => [ @$terms ] ); 
    280  
    281288    } 
    282289}