improving checkdigit sub.

This commit is contained in:
tipaul 2003-07-07 14:43:42 +00:00
parent a8574a5b83
commit bf1a858645

View file

@ -90,6 +90,9 @@ sub checkdigit {
#different from the one where the checkdigit on the number is
#not correct
if (C4::Context->preference("checkdigit") eq "none") {
return 1;
}
unless ( $nounique )
{
my $dbh=C4::Context->dbh;
@ -103,9 +106,6 @@ sub checkdigit {
}
}
if (C4::Context->preference("checkdigit") eq "none") {
return 1;
} else {
my @weightings = (8,4,6,3,5,2,1);
my $sum;
my $i = 1;
@ -124,7 +124,6 @@ sub checkdigit {
$valid = 1;
}
return $valid;
}
} # sub checkdigit
=item checkvalidisbn