From dc1d934c8f966dfbb824613f9ef034519acd2f05 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 11 Apr 2012 16:13:22 -0400 Subject: [PATCH] bug 7016 further followup: clarify return of GetItemnumbersForBiblio New function was actually returning an arrayref, so made perldoc and function usage consistent. Signed-off-by: Galen Charlton Signed-off-by: Paul Poulain --- C4/Items.pm | 6 +++--- C4/Reserves.pm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 59eaa69636..64ed0972a6 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1498,11 +1498,11 @@ sub GetLastAcquisitions { return @results; } -=head2 GetItemnumberForBiblio +=head2 GetItemnumbersForBiblio - my @itemnumbers = GetItemnumbersForBiblio($biblionumber); + my $itemnumbers = GetItemnumbersForBiblio($biblionumber); -Given a single biblionumber, return an array of all the corresponding itemnumbers +Given a single biblionumber, return an arrayref of all the corresponding itemnumbers =cut diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 2b915670c5..d1cb88eb31 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -383,14 +383,14 @@ sub GetReservesFromBorrowernumber { sub CanBookBeReserved{ my ($borrowernumber, $biblionumber) = @_; - my @items = GetItemnumbersForBiblio($biblionumber); + my $items = GetItemnumbersForBiblio($biblionumber); #get items linked via host records my @hostitems = get_hostitemnumbers_of($biblionumber); if (@hostitems){ - push (@items,@hostitems); + push (@$items,@hostitems); } - foreach my $item (@items){ + foreach my $item (@$items){ return 1 if CanItemBeReserved($borrowernumber, $item); } return 0; -- 2.39.5