From 632c78c073cc7f658442252e9d69cd689bcb2730 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 26 Aug 2016 13:22:31 +0200 Subject: [PATCH] Bug 15758: [QA Follow-up] Corrections related to GetBranches [1] C4/Search A call to Koha::Libraries is added to routine pazGetRecords, but the results of that call are not used. So removing it again. [2] catalogue/itemsearch.pl Although A=>B=>C=>D works, we'd better use here A=>B, C=>D. Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall --- C4/Search.pm | 3 +-- catalogue/itemsearch.pl | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 7e714699a5..22e57184ea 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -854,8 +854,7 @@ sub pazGetRecords { $results_per_page, $offset, $expanded_facet, $branches, $query_type, $scan ) = @_; - - $branches ||= { map { $_->branchcode => $_->branchname } Koha::Libraries->search }; + #NOTE: Parameter $branches is not used here ! my $paz = C4::Search::PazPar2->new(C4::Context->config('pazpar2url')); $paz->init(); diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl index 27c899a5e4..21ee163d4c 100755 --- a/catalogue/itemsearch.pl +++ b/catalogue/itemsearch.pl @@ -247,7 +247,7 @@ if (scalar keys %params > 0) { if ($format eq 'html') { # Retrieve data required for the form. - my @branches = map { value => $_->branchcode => label => $_->branchname }, Koha::Libraries->search( {}, { order_by => 'branchname' } ); + my @branches = map { value => $_->branchcode, label => $_->branchname }, Koha::Libraries->search( {}, { order_by => 'branchname' } ); my @locations; foreach my $location (@$location_values) { push @locations, { -- 2.39.5