Bug 27729: Fix use of grep and split in CheckReserves
A few lines of code were added to CheckReserves containing the wrong use of two perl functions: grep and split on bug 25232. A test was added even making these things pass. Test plan: Run t/db../Holds.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (cherry picked from commitc4c3d1e93c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commita299624404) Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
parent
e24fc24da8
commit
bcf6514cc7
|
|
@ -813,8 +813,8 @@ sub CheckReserves {
|
|||
# if item is not for loan it cannot be reserved either.....
|
||||
# except where items.notforloan < 0 : This indicates the item is holdable.
|
||||
|
||||
my @SkipHoldTrapOnNotForLoanValue = split( '|', C4::Context->preference('SkipHoldTrapOnNotForLoanValue') );
|
||||
return if @SkipHoldTrapOnNotForLoanValue && grep( $notforloan_per_item, @SkipHoldTrapOnNotForLoanValue );
|
||||
my @SkipHoldTrapOnNotForLoanValue = split( '\|', C4::Context->preference('SkipHoldTrapOnNotForLoanValue') );
|
||||
return if grep { $_ eq $notforloan_per_item } @SkipHoldTrapOnNotForLoanValue;
|
||||
|
||||
my $dont_trap = C4::Context->preference('TrapHoldsOnOrder') ? ($notforloan_per_item > 0) : ($notforloan_per_item && 1 );
|
||||
return if $dont_trap or $notforloan_per_itemtype;
|
||||
|
|
|
|||
Loading…
Reference in New Issue