From 3037ff9e81149615f94d3c4ff0e5b4c5240f3ce9 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Wed, 9 Sep 2009 09:29:03 +0200 Subject: [PATCH] [follow up](bug #3584) improve ccl detection This improve the detection of ccl queries, and do not duplicate the "ccl=" value. --- C4/Search.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 257f945e6e..8f3410f464 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1017,13 +1017,13 @@ sub buildQuery { my $cclq; my $indexes = getIndexes(); - for my $index (@$indexes){ - if($query =~ /($index)(,?\w)*:/){ - $cclq = 1; + if( $query !~ /\s*ccl=/ ){ + for my $index (@$indexes){ + if($query =~ /($index)(,?\w)*:/){ + $cclq = 1; + } } - } - if($cclq){ - $query = "ccl=$query"; + $query = "ccl=$query" if($cclq); } # for handling ccl, cql, pqf queries in diagnostic mode, skip the rest of the steps -- 2.39.5