From: dbs Date: Sun, 29 Mar 2009 20:36:46 +0000 (+0000) Subject: Fix for #54 - make SlimPAC search respect title/keyword/author/subject/series index X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7033162c5f5828f51e9ecf638261017b3de4ea19;p=evergreen%2Fmasslnc.git Fix for #54 - make SlimPAC search respect title/keyword/author/subject/series index git-svn-id: svn://svn.open-ils.org/ILS/trunk@12713 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 86f1a894c1..a6b17f5d3e 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -1008,6 +1008,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');