Bugzilla – Attachment 9128 Details for
Bug 7016
CanBookBeReserved uses GetItemsInfo unnecessarily
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug 7016 further followup: clarify return of GetItemnumbersForBiblio
bug-7016-further-followup-clarify-return-of-GetIte.patch (text/plain), 1.72 KB, created by
Galen Charlton
on 2012-04-11 20:16:38 UTC
(
hide
)
Description:
bug 7016 further followup: clarify return of GetItemnumbersForBiblio
Filename:
MIME Type:
Creator:
Galen Charlton
Created:
2012-04-11 20:16:38 UTC
Size:
1.72 KB
patch
obsolete
>From c709cf56acf33f27a53e10964ea1101431885200 Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmc@esilibrary.com> >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 <gmc@esilibrary.com> >--- > 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 3d6a9f4..7e98bb5 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1496,11 +1496,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 53db80d..95bd19a 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -391,14 +391,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; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7016
:
5861
|
5998
|
5999
|
7071
|
9127
| 9128