From c84dad3b187770160a845d77f146870cc0159c63 Mon Sep 17 00:00:00 2001 From: Reed Wade Date: Thu, 3 Mar 2011 23:13:00 -0500 Subject: [PATCH] bug 5693 - mc-ccode parens fix Signed-off-by: Nicole C. Engard Signed-off-by: Chris Cormack --- C4/Search.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index 45ebb24b03..26dc67ff30 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1276,7 +1276,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"; -- 2.39.5