[Koha-patches] [PATCH] (bug #3584) use default index, if not specified

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Mon Sep 7 10:01:45 CEST 2009


This select a default index to search on, if there is none.
---
 C4/Search.pm |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index 21eb767..aa9fb99 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -929,6 +929,10 @@ sub buildQuery {
                 my $operand = $operands[$i];
                 my $index   = $indexes[$i];
 
+                if(not $index){
+                    $index = 'kw';
+                } 
+
                 # Add index-specific attributes
                 # Date of Publication
                 if ( $index eq 'yr' ) {
-- 
1.6.0.4




More information about the Koha-patches mailing list