43 |
|
|
44 |
my $v = $params->{$f} || next; |
my $v = $params->{$f} || next; |
45 |
|
|
|
push @attr, "$f ISTRINC $v"; |
|
46 |
$q .= "$v "; |
$q .= "$v "; |
47 |
|
|
48 |
|
next if ($f eq 'all'); # don't add_attr for magic field all |
49 |
|
|
50 |
|
if ($v !~ /\s/) { |
51 |
|
push @attr, "$f ISTRINC $v"; |
52 |
|
} else { |
53 |
|
map { push @attr, "$f ISTRINC $_"; } split(/\s+/, $v); |
54 |
|
} |
55 |
} |
} |
56 |
|
|
57 |
$c->stash->{html_results} = sub { |
$c->stash->{html_results} = sub { |
58 |
my $res = $webpac->search( $q, $params->{'_template'}, @attr ); |
my $res = $webpac->search( $q, $params->{'_template'}, \@attr ); |
59 |
# $log->debug("controller got " . ( $#{$res} + 1 ) . " results for '$q' " . Dumper( $res )); |
# $log->debug("controller got " . ( $#{$res} + 1 ) . " results for '$q' " . Dumper( $res )); |
60 |
return $res; |
return $res; |
61 |
}; |
}; |