Bug 15758: [QA Follow-up] Corrections related to GetBranches
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 26 Aug 2016 11:22:31 +0000 (13:22 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Thu, 8 Sep 2016 14:36:06 +0000 (14:36 +0000)
[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 <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

C4/Search.pm
catalogue/itemsearch.pl

index 7e71469..22e5718 100644 (file)
@@ -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();
index 27c899a..21ee163 100755 (executable)
@@ -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, {