Bugzilla – Attachment 16195 Details for
Bug 9239
Koha should share Evergreen's QueryParser module for parsing queries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9239 QA follow-up: fix overeager quote escaping
Bug-9239-QA-follow-up-fix-overeager-quote-escaping.patch (text/plain), 3.01 KB, created by
Jared Camins-Esakov
on 2013-03-17 01:29:15 UTC
(
hide
)
Description:
Bug 9239 QA follow-up: fix overeager quote escaping
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2013-03-17 01:29:15 UTC
Size:
3.01 KB
patch
obsolete
>From a385c6c86d73336e0df7fcec3636c7860713acec Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Thu, 14 Mar 2013 14:02:26 -0400 >Subject: [PATCH] Bug 9239 QA follow-up: fix overeager quote escaping > >The quote escaping added two follow-ups ago was a little too eager, >and escaped perfectly valid quotes in some instances. This patch moves >the escaping deeper into the loop so that no needed quotes will be >escaped. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Test plan included here, as this is the last patch in the series: > >All tests pass. > >OPAC >Simple search >- Keyword searches using boolean operators || and && - OK >- Pubdate searches using pubdate() - OK >- Using different search options: keyword, title, etc. - OK > >Facets >- limit to available from a query parser simple search - OK >- Other facets - OK > >Advanced search >- Date range search - OK >- Itemtype limits - OK >- Language limit - OK >- Combining various serach options with and without 'more' options > and using boolean operators - OK > >Authorities >- Searching for partial and complete names like "M", "Benedictus" works. - OK >- Biblio count isc correct - OK >- Links to linked biblios work. - OK. > >INTRANET >Staged MARC import >- Import records using various matching points - OK > >Serials >- Search for a serial in subscription form - OK > >Acquisitions >- Search for existing record from basket - OK > >Authorities >- Running the linker script with QP on works. - OK >- Searching for authorities works. - OK >- Biblio count isc correct - OK >- Links to linked biblios work. - OK. > >NOTE: As agreed with Jared in chat, query parser should be >off by default for the next release. >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >--- > Koha/QueryParser/Driver/PQF/query_plan/node.pm | 1 - > .../QueryParser/Driver/PQF/query_plan/node/atom.pm | 5 ++++- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/Koha/QueryParser/Driver/PQF/query_plan/node.pm b/Koha/QueryParser/Driver/PQF/query_plan/node.pm >index 2695058..7d05937 100644 >--- a/Koha/QueryParser/Driver/PQF/query_plan/node.pm >+++ b/Koha/QueryParser/Driver/PQF/query_plan/node.pm >@@ -67,7 +67,6 @@ sub target_syntax { > if (ref($atom)) { > $atom_content = $atom->target_syntax($server); > if ($atom_content) { >- $atom_content =~ s/"/\\"/g; > $pqf .= ' @or ' x (scalar(@fields) - 1); > foreach my $attributes (@fields) { > $attributes->{'attr_string'} ||= ''; >diff --git a/Koha/QueryParser/Driver/PQF/query_plan/node/atom.pm b/Koha/QueryParser/Driver/PQF/query_plan/node/atom.pm >index 6a69c35..8de250d 100644 >--- a/Koha/QueryParser/Driver/PQF/query_plan/node/atom.pm >+++ b/Koha/QueryParser/Driver/PQF/query_plan/node/atom.pm >@@ -22,7 +22,10 @@ directly. > sub target_syntax { > my ($self, $server) = @_; > >- return ' "' . $self->content . '" '; >+ my $content = $self->content; >+ $content =~ s/"/\\"/g; >+ >+ return ' "' . $content . '" '; > } > > 1; >-- >1.7.9.5
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 9239
:
14020
|
14021
|
14022
|
14023
|
14172
|
14173
|
14174
|
14175
|
14180
|
14181
|
14182
|
14183
|
14847
|
14949
|
14950
|
14951
|
14952
|
14953
|
15121
|
15437
|
15865
|
15867
|
15929
|
15999
|
16004
|
16051
|
16125
|
16130
|
16131
|
16132
|
16133
|
16136
|
16140
|
16141
|
16142
|
16143
|
16144
|
16145
|
16146
|
16147
|
16148
|
16149
|
16150
|
16151
|
16152
|
16153
|
16154
|
16155
|
16180
|
16181
|
16182
|
16183
|
16184
|
16185
|
16186
|
16187
|
16188
|
16189
|
16190
|
16191
|
16192
|
16193
|
16194
| 16195