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.85,1.86


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 Biblio.pm,1.85,1.86
Date: Mon, 03 May 2004 02:19:24 -0700

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

Modified Files:
        Biblio.pm 
Log Message:
some fixes for mysql prepare & execute

Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -r1.85 -r1.86
*** Biblio.pm   2 Apr 2004 14:55:48 -0000       1.85
--- Biblio.pm   3 May 2004 09:19:22 -0000       1.86
***************
*** 1271,1275 ****
                                my $sth2 = $dbh->prepare("Insert into 
catalogueentry (entrytype,catalogueentry) values ('s',?)");
  
!                               $sth2->execute($subject[$i]);
                                $sth2->finish;
                        } else {
--- 1271,1275 ----
                                my $sth2 = $dbh->prepare("Insert into 
catalogueentry (entrytype,catalogueentry) values ('s',?)");
  
!                               $sth2->execute($subject[$i]) if ($subject[$i]);
                                $sth2->finish;
                        } else {
***************
*** 1289,1296 ****
                $sth->execute($bibnum);
                $sth->finish;
!               $sth = $dbh->prepare("Insert into bibliosubject values (?,?)");
                my $query;
                foreach $query (@subject) {
!                       $sth->execute($query,$bibnum);
                } # foreach
                $sth->finish;
--- 1289,1296 ----
                $sth->execute($bibnum);
                $sth->finish;
!               $sth = $dbh->prepare("Insert into bibliosubject 
(subject,biblionumber) values (?,?)");
                my $query;
                foreach $query (@subject) {
!                       $sth->execute($query,$bibnum) if ($query && $bibnum);
                } # foreach
                $sth->finish;
***************
*** 2046,2165 ****
  #     $encoding = C4::Context->preference("marcflavour") unless $encoding;
        if ($encoding eq "UNIMARC") {
!               s/\xe1/€/gm ;
!               s/\xe2/€/gm ;
!               s/\xe9/€/gm ;
!               s/\xec/€/gm ;
!               s/\xf1/€/gm ;
!               s/\xf3/€/gm ;
!               s/\xf9/€/gm ;
!               s/\xfb/€/gm ;
!               s/\xc1\x61/€/gm ;
!               s/\xc1\x65/€/gm ;
!               s/\xc1\x69/€/gm ;
!               s/\xc1\x6f/€/gm ;
!               s/\xc1\x75/€/gm ;
!               s/\xc1\x41/€/gm ;
!               s/\xc1\x45/€/gm ;
!               s/\xc1\x49/€/gm ;
!               s/\xc1\x4f/€/gm ;
!               s/\xc1\x55/€/gm ;
!               s/\xc2\x41/€/gm ;
!               s/\xc2\x45/€/gm ;
!               s/\xc2\x49/€/gm ;
!               s/\xc2\x4f/€/gm ;
!               s/\xc2\x55/€/gm ;
!               s/\xc2\x59/€/gm ;
!               s/\xc2\x61/€/gm ;
!               s/\xc2\x65/€/gm ;
!               s/\xc2\x69/€/gm ;
!               s/\xc2\x6f/€/gm ;
!               s/\xc2\x75/€/gm ;
!               s/\xc2\x79/€/gm ;
!               s/\xc3\x41/€/gm ;
!               s/\xc3\x45/€/gm ;
!               s/\xc3\x49/€/gm ;
!               s/\xc3\x4f/€/gm ;
!               s/\xc3\x55/€/gm ;
!               s/\xc3\x61/€/gm ;
!               s/\xc3\x65/€/gm ;
!               s/\xc3\x69/€/gm ;
!               s/\xc3\x6f/€/gm ;
!               s/\xc3\x75/€/gm ;
!               s/\xc4\x41/€/gm ;
!               s/\xc4\x4e/€/gm ;
!               s/\xc4\x4f/€/gm ;
!               s/\xc4\x61/€/gm ;
!               s/\xc4\x6e/€/gm ;
!               s/\xc4\x6f/€/gm ;
!               s/\xc8\x45/€/gm ;
!               s/\xc8\x49/€/gm ;
!               s/\xc8\x65/€/gm ;
!               s/\xc8\x69/€/gm ;
!               s/\xc8\x76/€/gm ;
!               s/\xc9\x41/€/gm ;
!               s/\xc9\x4f/€/gm ;
!               s/\xc9\x55/€/gm ;
!               s/\xc9\x61/€/gm ;
!               s/\xc9\x6f/€/gm ;
!               s/\xc9\x75/€/gm ;
!               s/\xca\x41/€/gm ;
!               s/\xca\x61/€/gm ;
!               s/\xd0\x43/€/gm ;
!               s/\xd0\x63/€/gm ;
                # this handles non-sorting blocks (if implementation requires 
this)
                $string = nsb_clean($_) ;
        } elsif ($encoding eq "USMARC" || $encoding eq "MARC21") {
                if(/[\xc1-\xff]/) {
!                       s/\xe1\x61/€/gm ;
!                       s/\xe1\x65/€/gm ;
!                       s/\xe1\x69/€/gm ;
!                       s/\xe1\x6f/€/gm ;
!                       s/\xe1\x75/€/gm ;
!                       s/\xe1\x41/€/gm ;
!                       s/\xe1\x45/€/gm ;
!                       s/\xe1\x49/€/gm ;
!                       s/\xe1\x4f/€/gm ;
!                       s/\xe1\x55/€/gm ;
!                       s/\xe2\x41/€/gm ;
!                       s/\xe2\x45/€/gm ;
!                       s/\xe2\x49/€/gm ;
!                       s/\xe2\x4f/€/gm ;
!                       s/\xe2\x55/€/gm ;
!                       s/\xe2\x59/€/gm ;
!                       s/\xe2\x61/€/gm ;
!                       s/\xe2\x65/€/gm ;
!                       s/\xe2\x69/€/gm ;
!                       s/\xe2\x6f/€/gm ;
!                       s/\xe2\x75/€/gm ;
!                       s/\xe2\x79/€/gm ;
!                       s/\xe3\x41/€/gm ;
!                       s/\xe3\x45/€/gm ;
!                       s/\xe3\x49/€/gm ;
!                       s/\xe3\x4f/€/gm ;
!                       s/\xe3\x55/€/gm ;
!                       s/\xe3\x61/€/gm ;
!                       s/\xe3\x65/€/gm ;
!                       s/\xe3\x69/€/gm ;
!                       s/\xe3\x6f/€/gm ;
!                       s/\xe3\x75/€/gm ;
!                       s/\xe4\x41/€/gm ;
!                       s/\xe4\x4e/€/gm ;
!                       s/\xe4\x4f/€/gm ;
!                       s/\xe4\x61/€/gm ;
!                       s/\xe4\x6e/€/gm ;
!                       s/\xe4\x6f/€/gm ;
!                       s/\xe8\x45/€/gm ;
!                       s/\xe8\x49/€/gm ;
!                       s/\xe8\x65/€/gm ;
!                       s/\xe8\x69/€/gm ;
!                       s/\xe8\x76/€/gm ;
!                       s/\xe9\x41/€/gm ;
!                       s/\xe9\x4f/€/gm ;
!                       s/\xe9\x55/€/gm ;
!                       s/\xe9\x61/€/gm ;
!                       s/\xe9\x6f/€/gm ;
!                       s/\xe9\x75/€/gm ;
!                       s/\xea\x41/€/gm ;
!                       s/\xea\x61/€/gm ;
                        # this handles non-sorting blocks (if implementation 
requires this)
                        $string = nsb_clean($_) ;
--- 2046,2165 ----
  #     $encoding = C4::Context->preference("marcflavour") unless $encoding;
        if ($encoding eq "UNIMARC") {
!               s/\xe1/Æ/gm ;
!               s/\xe2/Ð/gm ;
!               s/\xe9/Ø/gm ;
!               s/\xec/þ/gm ;
!               s/\xf1/æ/gm ;
!               s/\xf3/ð/gm ;
!               s/\xf9/ø/gm ;
!               s/\xfb/ß/gm ;
!               s/\xc1\x61/à/gm ;
!               s/\xc1\x65/è/gm ;
!               s/\xc1\x69/ì/gm ;
!               s/\xc1\x6f/ò/gm ;
!               s/\xc1\x75/ù/gm ;
!               s/\xc1\x41/À/gm ;
!               s/\xc1\x45/È/gm ;
!               s/\xc1\x49/Ì/gm ;
!               s/\xc1\x4f/Ò/gm ;
!               s/\xc1\x55/Ù/gm ;
!               s/\xc2\x41/Á/gm ;
!               s/\xc2\x45/É/gm ;
!               s/\xc2\x49/Í/gm ;
!               s/\xc2\x4f/Ó/gm ;
!               s/\xc2\x55/Ú/gm ;
!               s/\xc2\x59/Ý/gm ;
!               s/\xc2\x61/á/gm ;
!               s/\xc2\x65/é/gm ;
!               s/\xc2\x69/í/gm ;
!               s/\xc2\x6f/ó/gm ;
!               s/\xc2\x75/ú/gm ;
!               s/\xc2\x79/ý/gm ;
!               s/\xc3\x41/Â/gm ;
!               s/\xc3\x45/Ê/gm ;
!               s/\xc3\x49/Î/gm ;
!               s/\xc3\x4f/Ô/gm ;
!               s/\xc3\x55/Û/gm ;
!               s/\xc3\x61/â/gm ;
!               s/\xc3\x65/ê/gm ;
!               s/\xc3\x69/î/gm ;
!               s/\xc3\x6f/ô/gm ;
!               s/\xc3\x75/û/gm ;
!               s/\xc4\x41/Ã/gm ;
!               s/\xc4\x4e/Ñ/gm ;
!               s/\xc4\x4f/Õ/gm ;
!               s/\xc4\x61/ã/gm ;
!               s/\xc4\x6e/ñ/gm ;
!               s/\xc4\x6f/õ/gm ;
!               s/\xc8\x45/Ë/gm ;
!               s/\xc8\x49/Ï/gm ;
!               s/\xc8\x65/ë/gm ;
!               s/\xc8\x69/ï/gm ;
!               s/\xc8\x76/ÿ/gm ;
!               s/\xc9\x41/Ä/gm ;
!               s/\xc9\x4f/Ö/gm ;
!               s/\xc9\x55/Ü/gm ;
!               s/\xc9\x61/ä/gm ;
!               s/\xc9\x6f/ö/gm ;
!               s/\xc9\x75/ü/gm ;
!               s/\xca\x41/Å/gm ;
!               s/\xca\x61/å/gm ;
!               s/\xd0\x43/Ç/gm ;
!               s/\xd0\x63/ç/gm ;
                # this handles non-sorting blocks (if implementation requires 
this)
                $string = nsb_clean($_) ;
        } elsif ($encoding eq "USMARC" || $encoding eq "MARC21") {
                if(/[\xc1-\xff]/) {
!                       s/\xe1\x61/à/gm ;
!                       s/\xe1\x65/è/gm ;
!                       s/\xe1\x69/ì/gm ;
!                       s/\xe1\x6f/ò/gm ;
!                       s/\xe1\x75/ù/gm ;
!                       s/\xe1\x41/À/gm ;
!                       s/\xe1\x45/È/gm ;
!                       s/\xe1\x49/Ì/gm ;
!                       s/\xe1\x4f/Ò/gm ;
!                       s/\xe1\x55/Ù/gm ;
!                       s/\xe2\x41/Á/gm ;
!                       s/\xe2\x45/É/gm ;
!                       s/\xe2\x49/Í/gm ;
!                       s/\xe2\x4f/Ó/gm ;
!                       s/\xe2\x55/Ú/gm ;
!                       s/\xe2\x59/Ý/gm ;
!                       s/\xe2\x61/á/gm ;
!                       s/\xe2\x65/é/gm ;
!                       s/\xe2\x69/í/gm ;
!                       s/\xe2\x6f/ó/gm ;
!                       s/\xe2\x75/ú/gm ;
!                       s/\xe2\x79/ý/gm ;
!                       s/\xe3\x41/Â/gm ;
!                       s/\xe3\x45/Ê/gm ;
!                       s/\xe3\x49/Î/gm ;
!                       s/\xe3\x4f/Ô/gm ;
!                       s/\xe3\x55/Û/gm ;
!                       s/\xe3\x61/â/gm ;
!                       s/\xe3\x65/ê/gm ;
!                       s/\xe3\x69/î/gm ;
!                       s/\xe3\x6f/ô/gm ;
!                       s/\xe3\x75/û/gm ;
!                       s/\xe4\x41/Ã/gm ;
!                       s/\xe4\x4e/Ñ/gm ;
!                       s/\xe4\x4f/Õ/gm ;
!                       s/\xe4\x61/ã/gm ;
!                       s/\xe4\x6e/ñ/gm ;
!                       s/\xe4\x6f/õ/gm ;
!                       s/\xe8\x45/Ë/gm ;
!                       s/\xe8\x49/Ï/gm ;
!                       s/\xe8\x65/ë/gm ;
!                       s/\xe8\x69/ï/gm ;
!                       s/\xe8\x76/ÿ/gm ;
!                       s/\xe9\x41/Ä/gm ;
!                       s/\xe9\x4f/Ö/gm ;
!                       s/\xe9\x55/Ü/gm ;
!                       s/\xe9\x61/ä/gm ;
!                       s/\xe9\x6f/ö/gm ;
!                       s/\xe9\x75/ü/gm ;
!                       s/\xea\x41/Å/gm ;
!                       s/\xea\x61/å/gm ;
                        # this handles non-sorting blocks (if implementation 
requires this)
                        $string = nsb_clean($_) ;
***************
*** 2195,2198 ****
--- 2195,2201 ----
  # $Id$
  # $Log$
+ # Revision 1.86  2004/05/03 09:19:22  tipaul
+ # some fixes for mysql prepare & execute
+ #
  # Revision 1.85  2004/04/02 14:55:48  tipaul
  # renaming items.bulk field to items.itemcallnumber.




reply via email to

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