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 <fridolin.somers@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
a0b8805ce3
commit
7ecd21a1e4
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue