Bugzilla – Attachment 96461 Details for
Bug 24185
'If all unavailable' state for 'on shelf holds' makes holds page very slow if there's a lot of items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24185: Make holds page faster - call to subroutine moved below "if"
Bug-24185-Make-holds-page-faster---call-to-subrout.patch (text/plain), 1.65 KB, created by
Andrii Nugged
on 2019-12-18 20:04:13 UTC
(
hide
)
Description:
Bug 24185: Make holds page faster - call to subroutine moved below "if"
Filename:
MIME Type:
Creator:
Andrii Nugged
Created:
2019-12-18 20:04:13 UTC
Size:
1.65 KB
patch
obsolete
>From 1bc755be970de9d4415fdd51b36c97c7b90507c7 Mon Sep 17 00:00:00 2001 >From: Andrew Nugged <nugged@gmail.com> >Date: Wed, 18 Dec 2019 19:58:45 +0000 >Subject: [PATCH] Bug 24185: Make holds page faster - call to subroutine moved > below "if" > >`$on_shelf_holds` was assigned before "return .. if" but not used in that code piece, >so sometimes it was useless. Moved assignment after "return .. if". >--- > C4/Reserves.pm | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index ed9f47c1b6..b97f60d981 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1188,12 +1188,7 @@ and canreservefromotherbranches. > =cut > > sub IsAvailableForItemLevelRequest { >- my $item = shift; >- my $patron = shift; >- my $pickup_branchcode = shift; >- # items_any_available is precalculated status passed from request.pl when set of items >- # looped outside of IsAvailableForItemLevelRequest to avoid nested loops: >- my $items_any_available = shift; >+ my ( $item, $patron, $pickup_branchcode ) = @_; > > my $dbh = C4::Context->dbh; > # must check the notforloan setting of the itemtype >@@ -1222,12 +1217,6 @@ sub IsAvailableForItemLevelRequest { > if ( $on_shelf_holds == 1 ) { > return 1; > } elsif ( $on_shelf_holds == 2 ) { >- >- # if we have this param predefined from outer caller sub, we just need >- # to return it, so we saving from having loop inside other loop: >- return $items_any_available ? 0 : 1 >- if defined $items_any_available; >- > my @items = > Koha::Items->search( { biblionumber => $item->biblionumber } ); > >-- >2.17.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 24185
:
96079
|
96080
|
96151
|
96354
|
96460
|
96461
|
96464
|
96491
|
96492
|
96493
|
96500
|
97375
|
97376
|
97377
|
97378
|
101355
|
101356
|
101357
|
101358
|
101607
|
101608
|
101609
|
101611
|
101613
|
101614
|
101615
|
101616