[Koha-patches] [PATCH] Bugfix:[3.2] Corrects bad behavior in opac-reserve.pl
Chris Nighswonger
cnighswonger at foundations.edu
Wed Feb 3 14:47:33 CET 2010
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.
---
opac/opac-reserve.pl | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl
index 675b901..a0b0e45 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,"<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));
--
1.6.0.4
More information about the Koha-patches
mailing list