From 87c5821b50b9c94c8eb8233e0ea3f06d9f31e370 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 9763115610..b60a51a3d8 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; @@ -312,7 +313,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 ); @@ -347,6 +348,7 @@ sub pickup_locations { push @pickup_locations, $library->unblessed; } } + return wantarray ? @pickup_locations : \@pickup_locations; } -- 2.17.1