Bugzilla – Attachment 3065 Details for
Bug 5693
if parentheses used in ccode then searches against ccode fail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to wrap mc-ccode search limit in quotes
0001-bug-5693-mc-ccode-parens-fix.patch (text/plain), 1.16 KB, created by
Reed Wade
on 2011-02-04 03:29:48 UTC
(
hide
)
Description:
patch to wrap mc-ccode search limit in quotes
Filename:
MIME Type:
Creator:
Reed Wade
Created:
2011-02-04 03:29:48 UTC
Size:
1.16 KB
patch
obsolete
>From 5751c25a5491b61786dd8a420a8aca09690873b6 Mon Sep 17 00:00:00 2001 >From: Reed Wade <reed@catalyst.net.nz> >Date: Fri, 4 Feb 2011 16:17:03 +1300 >Subject: [PATCH] bug 5693 - mc-ccode parens fix >Content-Type: text/plain; charset="utf-8" >To: koha-patches@lists.koha-community.org > >--- > C4/Search.pm | 9 ++++++++- > 1 files changed, 8 insertions(+), 1 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index a469948..27f5679 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1270,7 +1270,14 @@ sub buildQuery { > # group_OR_limits, prefixed by mc- > # OR every member of the group > elsif ( $this_limit =~ /mc/ ) { >-# if ( $this_limit =~ /mc/ ) { >+ >+ if ( $this_limit =~ /mc-ccode:/ ) { >+ # in case the mc-ccode value has complicating chars like ()'s inside it we wrap in quotes >+ $this_limit =~ tr/"//d; >+ my ($k,$v) = split(/:/, $this_limit,2); >+ $this_limit = $k.":\"".$v."\""; >+ } >+ > $group_OR_limits .= " or " if $group_OR_limits; > $limit_desc .= " or " if $group_OR_limits; > $group_OR_limits .= "$this_limit"; >-- >1.7.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 5693
: 3065 |
3296