From 7ecd21a1e463db9c504b0d8929b11f7cfdcdb031 Mon Sep 17 00:00:00 2001 From: Andrew Nugged Date: Thu, 19 Dec 2019 18:16:33 +0200 Subject: [PATCH] Bug 24185: Make holds page faster - Improved "if" `$can_item_be_reserved eq 'OK'` moved in `&&` before `IsAvailableForItemLevelRequest` to cut away with static known values before calling to more resource consuming subroutine. Signed-off-by: Fridolin Somers Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- reserve/request.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reserve/request.pl b/reserve/request.pl index 5864b3d747..f69f706411 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -557,8 +557,8 @@ foreach my $biblionumber (@biblionumbers) { if ( !$item->{cantreserve} && !$exceeded_maxreserves - && IsAvailableForItemLevelRequest($item_object, $patron) && $can_item_be_reserved eq 'OK' + && IsAvailableForItemLevelRequest($item_object, $patron) ) { $item->{available} = 1; -- 2.39.5