bug fixing : add new check for isbn because u can find number in begenning of title

This commit is contained in:
btoumi 2007-05-22 13:39:26 +00:00
parent 5ff7fcffa4
commit a29ba65fba
1 changed files with 7 additions and 1 deletions

View File

@ -118,7 +118,13 @@ if($query) {
my $toggle=0;
my ($title,$isbn);
# fill isbn or title, depending on what has been entered
$isbn=$query if $query =~ /\d/;
#u must do check on isbn because u can find number in beginning of title
#check is on isbn legnth 13 for new isbn and 10 for old isbn
my $querylength=length($query);
if ($query =~ /\d/ and ($querylength eq 13 or $querylength eq 10))
{
$isbn=$query;
}
$title=$query unless $isbn;
my ( $countbr, @resultsbr ) = BreedingSearch( $title, $isbn ) if $query;
my @breeding_loop = ();