Bugzilla – Attachment 49809 Details for
Bug 15745
C4::Matcher gets CCL parsing error if term contains ? (question mark)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15745: C4::Matcher gets CCL parsing error if term contains ? (question mark)
Bug-15745-C4Matcher-gets-CCL-parsing-error-if-term.patch (text/plain), 1.71 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-04-01 17:51:06 UTC
(
hide
)
Description:
Bug 15745: C4::Matcher gets CCL parsing error if term contains ? (question mark)
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-04-01 17:51:06 UTC
Size:
1.71 KB
patch
obsolete
>From 61d5d81f8a4b21216f7d580b270fcdc5ec002114 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Fri, 5 Feb 2016 16:09:45 +1100 >Subject: [PATCH] Bug 15745: C4::Matcher gets CCL parsing error if term > contains ? (question mark) > >Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> > >Also fixes ! and + >Rebased to master >Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> >It makes perfect sense and works as expected. This part of the code is too >under-tested so no point requiring a regression test for such a simple change. >--- > C4/Matcher.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/C4/Matcher.pm b/C4/Matcher.pm >index 8cf1a99..9e04758 100644 >--- a/C4/Matcher.pm >+++ b/C4/Matcher.pm >@@ -651,7 +651,8 @@ sub get_matches { > else { > my $phr = C4::Context->preference('AggressiveMatchOnISBN') ? ',phr' : q{}; > $query = join( " or ", >- map { "$matchpoint->{'index'}$phr=$_" } @source_keys ); >+ map { "$matchpoint->{'index'}$phr=\"$_\"" } @source_keys ); >+ #NOTE: double-quote the values so you don't get a "Embedded truncation not supported" error when a term has a ? in it. > } > > require C4::Search; >@@ -807,7 +808,7 @@ sub _get_match_keys { > } else { > foreach my $subfield ($field->subfields()) { > if (exists $component->{'subfields'}->{$subfield->[0]}) { >- $string .= " " . $subfield->[1]; >+ $string .= " " . $subfield->[1]; #FIXME: It would be better to create an array and join with a space later... > } > } > } >-- >2.7.4
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 15745
:
47676
|
49255
| 49809