koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/C4 Koha.pm [R_2-2-7-1]


From: Antoine Farnault
Subject: [Koha-cvs] koha/C4 Koha.pm [R_2-2-7-1]
Date: Mon, 12 Feb 2007 09:54:57 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         R_2-2-7-1
Changes by:     Antoine Farnault <toins>        07/02/12 09:54:57

Modified files:
        C4             : Koha.pm 

Log message:
        Commiting BUG FIX for 2.2.7.1.
        
        Previous log was :
                forgotten encoding fix

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Koha.pm?cvsroot=koha&only_with_tag=R_2-2-7-1&r1=1.22.2.6&r2=1.22.2.6.2.1

Patches:
Index: Koha.pm
===================================================================
RCS file: /sources/koha/koha/C4/Koha.pm,v
retrieving revision 1.22.2.6
retrieving revision 1.22.2.6.2.1
diff -u -b -r1.22.2.6 -r1.22.2.6.2.1
--- Koha.pm     22 Nov 2006 10:22:08 -0000      1.22.2.6
+++ Koha.pm     12 Feb 2007 09:54:57 -0000      1.22.2.6.2.1
@@ -668,7 +668,8 @@
     my $targetcharset="utf8" if (C4::Context->preference("TemplateEncoding") 
eq "utf-8");
     $targetcharset="latin1" if (C4::Context->preference("TemplateEncoding") eq 
"iso-8859-1");
     my $decoder = guess_encoding($marc, qw/utf8 latin1/);
-    die $decoder unless ref($decoder);
+#     die $decoder unless ref($decoder);
+    if (ref($decoder)) {
     my $newRecord=MARC::Record->new();
     foreach my $field ($record->fields()){
       if ($field->tag()<'010'){
@@ -698,6 +699,9 @@
   } else {
     return $record;
   }
+  } else {
+    return $record;
+  }
 }
 1;
 __END__




reply via email to

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