koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Biblio.pm,1.119,1.120


From: Henri-Damien LAURENT
Subject: [Koha-cvs] CVS: koha/C4 Biblio.pm,1.119,1.120
Date: Wed, 15 Jun 2005 09:09:46 -0700

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23328/C4

Modified Files:
        Biblio.pm 
Log Message:
Displaying dashed isbn.

Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.119
retrieving revision 1.120
diff -C2 -r1.119 -r1.120
*** Biblio.pm   1 Jun 2005 20:43:58 -0000       1.119
--- Biblio.pm   15 Jun 2005 16:09:43 -0000      1.120
***************
*** 71,74 ****
--- 71,75 ----
    
    &FindDuplicate
+   &DisplayISBN
  );
  
***************
*** 476,479 ****
--- 477,481 ----
      my ( $dbh, $bibid ) = @_;
      my $record = MARC::Record->new();
+ #     warn "". $bidid;
  
      #---- TODO : the leader is missing
***************
*** 2621,2625 ****
        return;
  }
! 
  END { }    # module clean-up code here (global destructor)
  
--- 2623,2661 ----
        return;
  }
! sub DisplayISBN {
!       my ($isbn)address@hidden;
!       my $seg1;
!       if(substr($isbn, 0, 1) <=7) {
!               $seg1 = substr($isbn, 0, 1);
!       } elsif(substr($isbn, 0, 2) <= 94) {
!               $seg1 = substr($isbn, 0, 2);
!       } elsif(substr($isbn, 0, 3) <= 995) {
!               $seg1 = substr($isbn, 0, 3);
!       } elsif(substr($isbn, 0, 4) <= 9989) {
!               $seg1 = substr($isbn, 0, 4);
!       } else {
!               $seg1 = substr($isbn, 0, 5);
!       }
!       my $x = substr($isbn, length($seg1));
!       my $seg2;
!       if(substr($x, 0, 2) <= 19) {
! #             if(sTmp2 < 10) sTmp2 = "0" sTmp2;
!               $seg2 = substr($x, 0, 2);
!       } elsif(substr($x, 0, 3) <= 699) {
!               $seg2 = substr($x, 0, 3);
!       } elsif(substr($x, 0, 4) <= 8399) {
!               $seg2 = substr($x, 0, 4);
!       } elsif(substr($x, 0, 5) <= 89999) {
!               $seg2 = substr($x, 0, 5);
!       } elsif(substr($x, 0, 6) <= 9499999) {
!               $seg2 = substr($x, 0, 6);
!       } else {
!               $seg2 = substr($x, 0, 7);
!       }
!       my $seg3=substr($x,length($seg2));
!       $seg3=substr($seg3,0,length($seg3)-1) ;
!       my $seg4 = substr($x, -1, 1);
!       return "$seg1-$seg2-$seg3-$seg4";
! }
  END { }    # module clean-up code here (global destructor)
  
***************
*** 2636,2639 ****
--- 2672,2678 ----
  # $Id$
  # $Log$
+ # Revision 1.120  2005/06/15 16:09:43  hdl
+ # Displaying dashed isbn.
+ #
  # Revision 1.119  2005/06/01 20:43:58  genjimoto
  # patch from Genji (Waylon R.) to update subjects in MARC tables when 
systempref has MARC=OFF




reply via email to

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