fix minor warning issues in SCO
authorGalen Charlton <galen.charlton@liblime.com>
Wed, 3 Jun 2009 19:12:05 +0000 (14:12 -0500)
committerGalen Charlton <galen.charlton@liblime.com>
Wed, 3 Jun 2009 19:37:29 +0000 (14:37 -0500)
* test for NO_MORE_RENEWALS now does expect
  that hash key will always exist
* removed unconditional warn

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
opac/sco/sco-main.pl

index 984aded..9b15ac5 100755 (executable)
@@ -80,7 +80,7 @@ elsif ( $op eq "checkout" ) {
     if (scalar keys %$impossible) {
 
         #  warn "impossible: numkeys: " . scalar (keys(%$impossible));
-        warn join " ", keys %$impossible;
+        #warn join " ", keys %$impossible;
         my $issue_error = (keys %$impossible)[0];
 
         # FIXME  we assume only one error.
@@ -147,7 +147,7 @@ if ($borrower->{cardnumber}) {
     my ($issueslist) = GetPendingIssues( $borrower->{'borrowernumber'} );
     foreach my $it (@$issueslist) {
         my ($renewokay, $renewerror) = CanBookBeIssued($borrower, $it->{'barcode'},'','');
-        $it->{'norenew'} = 1 if $renewokay->{'NO_MORE_RENEWALS'} == 1;
+        $it->{'norenew'} = 1 if $renewokay->{'NO_MORE_RENEWALS'};
         push @issues, $it;
     }