Bug 10166: Increment holdable counter origin/new/bug_10166
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 6 May 2013 12:35:00 +0000 (08:35 -0400)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 6 May 2013 12:38:09 +0000 (08:38 -0400)
The $anyholdable variable was set to 0 or 1. However, as it is set in
a loop, and future changes to the opac-reserve.pl script may require
knowing how many items the patron is going to place a hold on, it makes
more sense to treat $anyholdable as a counter. This follow up turns it
into one.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
opac/opac-reserve.pl

index c6e05f5..d0da2c5 100755 (executable)
@@ -538,7 +538,7 @@ foreach my $biblioNum (@biblionumbers) {
         $biblioLoopIter{already_patron_possession} = 1;
     }
 
-    if( $biblioLoopIter{holdable} ){ $anyholdable = 1; }
+    if( $biblioLoopIter{holdable} ){ $anyholdable++; }
 
     push @$biblioLoop, \%biblioLoopIter;
 }