Bugzilla – Attachment 4257 Details for
Bug 6406
double space in query result in no result
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
0001-BZ6406-double-space-in-search-fails.patch (text/plain), 1.02 KB, created by
Paul Poulain
on 2011-05-25 10:24:37 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2011-05-25 10:24:37 UTC
Size:
1.02 KB
patch
obsolete
>From 94b1110057025656a66fc268c3d01e4f199a5e16 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Wed, 25 May 2011 12:09:39 +0200 >Subject: [PATCH] BZ6406 double space in search fails > >if you put 2 spaces between two words in any search, the result is that the >search does not work anymore >--- > C4/Search.pm | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index ab7cb59..f4c723f 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1127,7 +1127,11 @@ sub buildQuery { > > # COMBINE OPERANDS, INDEXES AND OPERATORS > if ( $operands[$i] ) { >- $operands[$i]=~s/^\s+//; >+ # remove starting blanks >+ $operands[$i] =~ s/^\s+//; >+ # remove multiple blanks that breaks the resulting query >+ $operands[$i] =~ s/\s+/ /g; >+ next unless $operands[$i]; > > # A flag to determine whether or not to add the index to the query > my $indexes_set; >-- >1.7.4.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6406
: 4257