koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/cataloguing addbooks.pl


From: Bruno Toumi
Subject: [Koha-cvs] koha/cataloguing addbooks.pl
Date: Tue, 22 May 2007 13:39:26 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Changes by:     Bruno Toumi <btoumi>    07/05/22 13:39:26

Modified files:
        cataloguing    : addbooks.pl 

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

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/addbooks.pl?cvsroot=koha&r1=1.10&r2=1.11

Patches:
Index: addbooks.pl
===================================================================
RCS file: /cvsroot/koha/koha/cataloguing/addbooks.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- addbooks.pl 24 Apr 2007 13:54:29 -0000      1.10
+++ addbooks.pl 22 May 2007 13:39:26 -0000      1.11
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: addbooks.pl,v 1.10 2007/04/24 13:54:29 hdl Exp $
+# $Id: addbooks.pl,v 1.11 2007/05/22 13:39:26 btoumi Exp $
 
 #
 # Modified address@hidden 12:00 01 April 2001
@@ -118,7 +118,13 @@
 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 = ();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]