From a29ba65fbae8061722cf66d3aea021f41d2f8476 Mon Sep 17 00:00:00 2001 From: btoumi Date: Tue, 22 May 2007 13:39:26 +0000 Subject: [PATCH] bug fixing : add new check for isbn because u can find number in begenning of title --- cataloguing/addbooks.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl index 88d7c735f2..44d96c079e 100755 --- a/cataloguing/addbooks.pl +++ b/cataloguing/addbooks.pl @@ -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 = (); -- 2.39.5