From 04deaec41a88410431c365ecdc6aec3a66efa159 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Wed, 16 Dec 2009 12:21:47 +1300 Subject: [PATCH] Bug 3785 - Fixing a bug that was stopping holds if no maximum number was set --- C4/ILSDI/Utility.pm | 2 +- opac/opac-reserve.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/ILSDI/Utility.pm b/C4/ILSDI/Utility.pm index 77886ca..76a7e29 100644 --- a/C4/ILSDI/Utility.pm +++ b/C4/ILSDI/Utility.pm @@ -98,7 +98,7 @@ sub CanBookBeReserved { $out = undef; } my @reserves = GetReservesFromBorrowernumber( $borrower->{'borrowernumber'} ); - if ( scalar(@reserves) >= $MAXIMUM_NUMBER_OF_RESERVES ) { + if ( $MAXIMUM_NUMBER_OF_RESERVES && scalar(@reserves) >= $MAXIMUM_NUMBER_OF_RESERVES ) { $out = undef; } foreach my $res (@reserves) { diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index c5b665b..b36cfda 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -264,7 +264,7 @@ if ( $borr->{debarred} && ($borr->{debarred} eq 1) ) { my @reserves = GetReservesFromBorrowernumber( $borrowernumber ); $template->param( RESERVES => \@reserves ); -if ( scalar(@reserves) >= $MAXIMUM_NUMBER_OF_RESERVES ) { +if ( $MAXIMUM_NUMBER_OF_RESERVES && scalar(@reserves) >= $MAXIMUM_NUMBER_OF_RESERVES ) { $template->param( message => 1 ); $noreserves = 1; $template->param( too_many_reserves => scalar(@reserves)); -- 1.6.3.3