From 3746ce17ba8caa50bf5c8c9b7154e490f7389f6f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 22 Jun 2012 16:38:20 +0200 Subject: [PATCH] Bug 8233: Replace the given statement with for Signed-off-by: Chris Cormack --- Koha/SearchEngine/Solr/QueryBuilder.pm | 2 +- opac/opac-search.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/SearchEngine/Solr/QueryBuilder.pm b/Koha/SearchEngine/Solr/QueryBuilder.pm index ba653b32b5..414d1e1af5 100644 --- a/Koha/SearchEngine/Solr/QueryBuilder.pm +++ b/Koha/SearchEngine/Solr/QueryBuilder.pm @@ -43,7 +43,7 @@ sub build_advanced_query { # And others $index_name = @$indexes[$i] if @$indexes[$i]; my $operator = defined @$operators[$i-1] ? @$operators[$i-1] : 'AND'; - given ( uc ( $operator ) ) { + for ( uc ( $operator ) ) { when ('OR'){ $q .= BuildTokenString($index_name, $kw, 'OR'); } diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 8028c0a595..e39e5479b4 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -30,7 +30,7 @@ use Modern::Perl; use C4::Context; my $searchengine = C4::Context->preference("SearchEngine"); -given ( $searchengine ) { +for ( $searchengine ) { when ( /^Solr$/ ) { warn "We use Solr"; require 'opac/search.pl'; -- 2.39.5