[open-ils-commits] r12713 - trunk/Open-ILS/src/perlmods/OpenILS/WWW (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Mar 29 16:36:50 EDT 2009


Author: dbs
Date: 2009-03-29 16:36:46 -0400 (Sun, 29 Mar 2009)
New Revision: 12713

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
Log:
Fix for #54 - make SlimPAC search respect title/keyword/author/subject/series index


Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2009-03-27 23:14:11 UTC (rev 12712)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2009-03-29 20:36:46 UTC (rev 12713)
@@ -1008,6 +1008,9 @@
 	$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');



More information about the open-ils-commits mailing list