[Koha-cvs] koha/C4 Search.pm
Joshua Ferraro
jmf at liblime.com
Wed May 9 21:39:03 CEST 2007
CVSROOT: /sources/koha
Module name: koha
Changes by: Joshua Ferraro <kados> 07/05/09 19:39:02
Modified files:
C4 : Search.pm
Log message:
Fix for bug 1249: Searching for a title beginning with And, Or, or Not
results in an error
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&r1=1.139&r2=1.140
Patches:
Index: Search.pm
===================================================================
RCS file: /sources/koha/koha/C4/Search.pm,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -b -r1.139 -r1.140
--- Search.pm 9 May 2007 10:09:40 -0000 1.139
+++ Search.pm 9 May 2007 19:39:02 -0000 1.140
@@ -25,7 +25,7 @@
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.139 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.140 $' =~ /\d+/g;
shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
};
@@ -558,6 +558,7 @@
my $weight_fields = C4::Context->parameters("WeightFields") || 0;
if ( $operands[$i] ) {
+ $operand =~ s/^(and|or|not)//i;
# STEMMING FIXME: need to refine the field weighting so stemmed operands don't disrupt the query ranking
if ($stemming) {
More information about the Koha-cvs
mailing list