@@ -, +, @@ below "if" --- C4/Reserves.pm | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) --- a/C4/Reserves.pm +++ a/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 } ); --