From b97c4dba7a183e826ac8c1b37d0261f0327f12c2 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Tue, 16 Nov 2010 19:33:38 -0500 Subject: [PATCH] Bug 4074 Fix fail to parse simple qualified search Searches such as au,phr and kw,wrdl were passing through the regexes that should replace colon with equals add wrdl and phr use trn so not just rtrn is spotted Where we were checking for multiple spaces specify that in the regex not just two spaces Signed-off-by: Galen Charlton Signed-off-by: Chris Cormack --- C4/Search.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index d36459a803..93999bb6ae 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1308,10 +1308,11 @@ sub buildQuery { # if user wants to do ccl or cql, start the query with that # $query =~ s/:/=/g; $query =~ s/(?<=(ti|au|pb|su|an|kw|mc)):/=/g; - $query =~ s/(?<=rtrn):/=/g; + $query =~ s/(?<=(wrdl)):/=/g; + $query =~ s/(?<=(trn|phr)):/=/g; $limit =~ s/:/=/g; for ( $query, $query_desc, $limit, $limit_desc ) { - s/ / /g; # remove extra spaces + s/ +/ /g; # remove extra spaces s/^ //g; # remove any beginning spaces s/ $//g; # remove any ending spaces s/==/=/g; # remove double == from query -- 2.39.5