Changeset 50

Show
Ignore:
Timestamp:
03/19/07 19:23:43 (3 years ago)
Author:
eevee
Message:

Fixed a wee little problem with searching for two types not working at all.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/lib/Vee/Controller/Dex/Search.pm

    r48 r50  
    166166                push @{$criteria{'-and'}}, { type1 => $p->{type}, type2 => undef }; 
    167167            } elsif (scalar @{ $p->{type} } == 2) { 
    168                 push @{$criteria{'-and'}}, [ 
     168                push @{$criteria{'-and'}}, { -or => [ 
    169169                    { type1 => $p->{type}[0], type2 => $p->{type}[1] }, 
    170170                    { type1 => $p->{type}[1], type2 => $p->{type}[0] }, 
    171                 ]; 
     171                ] }; 
    172172            } else { 
    173173                # TODO: this should probably be better and throw an error of some sort