From 6e376d0484dba6b96a66f2cded20efd61b8f1d13 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Wed, 3 Feb 2010 08:47:33 -0500 Subject: [PATCH] Bugfix:[3.2] Corrects bad behavior in opac-reserve.pl When AllowOnShelfHolds is enabled, but maxreserves is NULL, attempting to reserve an item results in a basically blank page being returned with no error message. This patch adds a check to see if the check for maxreserves has returned a value and bypasses the application of it if it has not. Signed-off-by: Galen Charlton --- opac/opac-reserve.pl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 675b90109a..a0b0e45caa 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -96,16 +96,6 @@ $template->param( branch => $branch ); my $CGIbranchloop = GetBranchesLoop($branch); $template->param( CGIbranch => $CGIbranchloop ); -#Debug -#output_html_with_http_headers($query,$cookie," @biblionumbers \n"); -#exit; -#my %bibdata; -#my $rank; -#my $biblionumber; -#my $bibdata; -#my %itemhash; -#my $forloan; - # # # Build hashes of the requested biblio(item)s and items. @@ -264,7 +254,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)); -- 2.39.5