Bugzilla – Attachment 5861 Details for
Bug 7016
CanBookBeReserved uses GetItemsInfo unnecessarily
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-7016-CanBookBeReserved-uses-GetItemsInfo-unneces.patch (text/plain), 1.15 KB, created by
Ian Walls
on 2011-10-12 19:38:54 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Ian Walls
Created:
2011-10-12 19:38:54 UTC
Size:
1.15 KB
patch
obsolete
>From 038296d61995d7f93fe8960709848044a870a731 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] 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. >--- > C4/Reserves.pm | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index f83f0ff..152872a 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -382,9 +382,9 @@ sub GetReservesFromBorrowernumber { > sub CanBookBeReserved{ > my ($borrowernumber, $biblionumber) = @_; > >- my @items = GetItemsInfo($biblionumber); >+ my @items = get_itemnumbers_of($biblionumber); > foreach my $item (@items){ >- return 1 if CanItemBeReserved($borrowernumber, $item->{itemnumber}); >+ return 1 if CanItemBeReserved($borrowernumber, $item); > } > return 0; > } >-- >1.7.4.1 >
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