From e12f5c9e843c076009e90eb38f2f690900feb960 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Wed, 29 May 2019 02:06:46 -0300 Subject: [PATCH] Bug 22284: (follow-up) Use GetReserveControlBranch in Koha::Item->pickup_locations Signed-off-by: Josef Moravec --- Koha/Item.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index 4e4f1ac10b..2dc7316586 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -27,6 +27,7 @@ use Koha::DateUtils qw( dt_from_string ); use C4::Context; use C4::Circulation; +use C4::Reserves; use Koha::Checkouts; use Koha::IssuingRules; use Koha::Item::Transfer::Limits; @@ -295,7 +296,7 @@ sub pickup_locations { my $patron = $params->{patron}; my $circ_control_branch = - C4::Circulation::_GetCircControlBranch( $self->unblessed(), $patron ); + C4::Reserves::GetReservesControlBranch( $self->unblessed(), $patron->unblessed ); my $branchitemrule = C4::Circulation::GetBranchItemRule( $circ_control_branch, $self->itype ); @@ -330,6 +331,7 @@ sub pickup_locations { push @pickup_locations, $library->unblessed; } } + return wantarray ? @pickup_locations : \@pickup_locations; } -- 2.11.0