git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4_0@12720
dcc99617-32d9-48b4-a31d-
7c20da2025e4
# This is the front part of the string before any special tokens were parsed.
# Add this data to the default search class
my $type = $arghash->{default_class} || 'keyword';
+ $type = ($type eq '-') ? 'keyword' : $type;
+ $type = ($type !~ /^(title|author|keyword|subject|series)$/o) ? 'keyword' : $type;
$search->{$type} = {} unless $search->{$type};
$search->{$type}->{term} =
($search->{$type}->{term}) ? $search->{$type}->{term} . " $query" : $query;
$terms .= $cgi->param('searchTerms') if $cgi->param('searchTerms');
$class = $cgi->param('searchClass') if $cgi->param('searchClass');
- if ($class && $terms !~ m/^$class:/o) {
- $terms =~ s{^(\S*:)?\s*}{$class: }o;
- }
$class ||= '-';
$type = $cgi->param('responseType') if $cgi->param('responseType');
limit => $limit,
sort => $sort,
sort_dir => $sortdir,
+ default_class => $class,
($lang ? ( 'language' => $lang ) : ()),
} => $terms => 1
)->gather(1);