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 <gmcharlt@gmail.com>
This commit is contained in:
Chris Nighswonger 2010-02-03 08:47:33 -05:00 committed by Galen Charlton
parent 1caeb52f03
commit 6e376d0484
1 changed files with 1 additions and 11 deletions

View File

@ -96,16 +96,6 @@ $template->param( branch => $branch );
my $CGIbranchloop = GetBranchesLoop($branch);
$template->param( CGIbranch => $CGIbranchloop );
#Debug
#output_html_with_http_headers($query,$cookie,"<html><head></head><body> @biblionumbers </body></html>\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));