From: dbs Date: Sun, 29 Mar 2009 20:45:01 +0000 (+0000) Subject: Backport r12713 from trunk: make SlimPAC respect author/title/subject/series indexes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=98d45f0b923fbb006072082f25eff0cb5386737c;p=Evergreen.git Backport r12713 from trunk: make SlimPAC respect author/title/subject/series indexes git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@12715 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index 04fe9993a0..3fb47a802a 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -970,6 +970,9 @@ sub opensearch_feed { $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');