[Koha-patches] [PATCH] [follow up](bug #3584) improve ccl detection
Nahuel ANGELINETTI
nahuel.angelinetti at biblibre.com
Wed Sep 9 09:42:15 CEST 2009
This improve the detection of ccl queries, and do not duplicate the "ccl=" value.
---
C4/Search.pm | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/C4/Search.pm b/C4/Search.pm
index 89eebc2..8159ea3 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1070,13 +1070,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
--
1.6.0.4
More information about the Koha-patches
mailing list