bug 2625: finish fix by converting another array to hash

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Galen Charlton 2008-09-18 19:09:02 -05:00
parent 53a403ee64
commit e6daded166

View file

@ -64,8 +64,8 @@ my $print = $input->param('print');
my @failedrenews = $input->param('failedrenew');
my @failedreturns = $input->param('failedreturn');
my $error = $input->param('error');
my @renew_failed;
for my $renew (@failedrenews) { $renew_failed[$renew] = 1; }
my %renew_failed;
for my $renew (@failedrenews) { $renew_failed{$renew} = 1; }
my %return_failed;
for my $failedret (@failedreturns) { $return_failed{$failedret} = 1; }
@ -247,7 +247,7 @@ for ( my $i = 0 ; $i < $count ; $i++ ) {
my ( $renewokay,$renewerror ) = CanBookBeRenewed( $borrowernumber, $issue->[$i]{'itemnumber'});
$row{'norenew'} = !$renewokay;
$row{"norenew_reason_$renewerror"} = 1 if $renewerror;
$row{'renew_failed'} = $renew_failed[$issue->[$i]{'itemnumber'}];
$row{'renew_failed'} = $renew_failed{ $issue->[$i]{'itemnumber'} };
$row{'return_failed'} = $return_failed{$issue->[$i]{'barcode'}};
push( @issuedata, \%row );
}