Bugzilla – Attachment 5999 Details for
Bug 7016
CanBookBeReserved uses GetItemsInfo unnecessarily
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 7016: CanBookBeReserved uses GetItemsInfo unnecessarily
SIGNED-OFF-Bug-7016-CanBookBeReserved-uses-GetItem.patch (text/plain), 1.59 KB, created by
Nicole C. Engard
on 2011-10-19 20:05:43 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 7016: CanBookBeReserved uses GetItemsInfo unnecessarily
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2011-10-19 20:05:43 UTC
Size:
1.59 KB
patch
obsolete
>From 13d932692c602e9bd381e7cd3fe6f19a3b21b3a9 Mon Sep 17 00:00:00 2001 >From: Ian Walls <ian.walls@bywatersolutions.com> >Date: Wed, 12 Oct 2011 15:35:31 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 7016: CanBookBeReserved uses GetItemsInfo unnecessarily > >CanBookBeReserved uses the very heavy-weight function GetItemsInfo to simply retrieve >the itemnumbers attached to a given biblio. The function get_itemnumbers_of() is much >lighter-weight and returns the required information; switching to it will reduce the overall >system resource cost of placing a hold. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > C4/Reserves.pm | 16 +++++++--------- > 1 files changed, 7 insertions(+), 9 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index f7a2e72..f12c23f 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -383,17 +383,15 @@ sub GetReservesFromBorrowernumber { > sub CanBookBeReserved{ > my ($borrowernumber, $biblionumber) = @_; > >- my @items = GetItemsInfo($biblionumber); >- >- #get items linked via host records >- my $marcrecord= GetMarcBiblio($biblionumber); >- my @hostitemInfos = GetHostItemsInfo($marcrecord); >- if (@hostitemInfos){ >- push (@items,@hostitemInfos); >- } >+ my @items = get_itemnumbers_of($biblionumber); >+ #get items linked via host records >+ my @hostitems = get_hostitemnumbers_of($biblionumber); >+ if (@hostitems){ >+ push (@items,@hostitems); >+ } > > foreach my $item (@items){ >- return 1 if CanItemBeReserved($borrowernumber, $item->{itemnumber}); >+ return 1 if CanItemBeReserved($borrowernumber, $item); > } > return 0; > } >-- >1.7.2.3
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