Search.pm was ignoring searches less than 3 characters. This broke any

searches like "class=JF".
This commit is contained in:
tonnesen 2002-11-01 03:55:03 +00:00
parent 15b591f07a
commit 6fb2f28aff
1 changed files with 3 additions and 1 deletions

View File

@ -175,7 +175,9 @@ HTML.
sub catalogsearch {
my ($env,$type,$search,$num,$offset)=@_;
my $dbh = C4Connect();
foreach my $key (%$search){
foreach my $key (keys %$search){
(next) if ($key eq 'class'); # Don't worry about classes less than 3 characters
(next) if ($key eq 'branch'); # Don't worry about branches less than 3 characters
if (length($search->{$key}) < 3){
undef ($search->{$key});
}