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 <gmc@esilibrary.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
bc79b5d000
commit
c85c7ca150
|
|
@ -1500,11 +1500,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
|
||||
|
||||
|
|
|
|||
|
|
@ -384,14 +384,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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue