Changeset 1886
- Timestamp:
- 04/14/08 09:36:18 (19 months ago)
- Files:
-
- 1 modified
-
branches/release-34/lib/MT/App/Search.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-34/lib/MT/App/Search.pm
r1884 r1886 642 642 my $rvalue = sub { 643 643 my %rvalues = ( 644 REQUIREDlike => { like => '%' . $_[1] . '%' }, 645 REQUIRED1 => $_[1], 644 646 NORMALlike => { like => '%' . $_[1] . '%' }, 645 647 NORMAL1 => $_[1], … … 688 690 $term->{term} 689 691 ); 690 push @tmp, { $cols[$i] => $test }; 691 unless ( $i == $number - 1 ) { 692 push @tmp, '-or'; 692 if ( 'PROHIBITED' eq $term->{type} ) { 693 my @this_term; 694 push @this_term, { $cols[$i] => $test }; 695 push @this_term, '-or'; 696 push @this_term, { $cols[$i] => \' IS NULL' }; 697 push @tmp, \@this_term; 698 unless ( $i == $number - 1 ) { 699 push @tmp, '-and'; 700 } 701 } 702 else { 703 push @tmp, { $cols[$i] => $test }; 704 unless ( $i == $number - 1 ) { 705 push @tmp, '-or'; 706 } 693 707 } 694 708 }
