From 560a894151a127201ee834f4d278d9a3ad8056c2 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 11 Apr 2019 17:15:51 -0300 Subject: [PATCH] Bug 22688: (QA follow-up) Use search_params as all() does It looks like selected would be passed all the way down to Koha::Libraries->search and this would fail all the time. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall --- Koha/Template/Plugin/Branches.pm | 6 ++++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm index df11ab897d..da615f5673 100644 --- a/Koha/Template/Plugin/Branches.pm +++ b/Koha/Template/Plugin/Branches.pm @@ -88,8 +88,10 @@ sub InIndependentBranchesMode { sub pickup_locations { my ( $self, $params ) = @_; - my $selected = $params->{selected}; - my $libraries = Koha::Libraries->pickup_locations($params); + my $search_params = $params->{search_params} || {}; + my $selected = $params->{selected}; + my $libraries = Koha::Libraries->pickup_locations($search_params); + for my $l (@$libraries) { if ( defined $selected and $l->{branchcode} eq $selected or not defined $selected diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index d643c80f9a..b26fbaf99d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -231,7 +231,7 @@ [% UNLESS ( bibitemloo.holdable ) %] [% ELSE %] [% SET at_least_one_library_not_available_for_pickup = 0 %] -- 2.20.1 (Apple Git-117)