koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/authorities authorities.pl [rel_2_2]


From: Joshua Ferraro
Subject: [Koha-cvs] koha/authorities authorities.pl [rel_2_2]
Date: Sat, 04 Mar 2006 17:18:10 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Joshua Ferraro <address@hidden> 06/03/04 17:18:10

Modified files:
        authorities    : authorities.pl 

Log message:
        Fix encoding for authorities editor too

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/authorities/authorities.pl.diff?only_with_tag=rel_2_2&tr1=1.8.2.8&tr2=1.8.2.9&r1=text&r2=text

Patches:
Index: koha/authorities/authorities.pl
diff -u koha/authorities/authorities.pl:1.8.2.8 
koha/authorities/authorities.pl:1.8.2.9
--- koha/authorities/authorities.pl:1.8.2.8     Sun Feb  5 21:59:21 2006
+++ koha/authorities/authorities.pl     Sat Mar  4 17:18:10 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: authorities.pl,v 1.8.2.8 2006/02/05 21:59:21 kados Exp $
+# $Id: authorities.pl,v 1.8.2.9 2006/03/04 17:18:10 kados Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -328,11 +328,9 @@
        # build indicator hash.
        my @ind_tag = $input->param('ind_tag');
        my @indicator = $input->param('indicator');
-       my %indicators;
-       for (my $i=0;$i<=$#ind_tag;$i++) {
-               $indicators{$ind_tag[$i]} = $indicator[$i];
-       }
-       my $record = 
AUTHhtml2marc($dbh,address@hidden,address@hidden,address@hidden,%indicators);
+       my $xml = 
AUTHhtml2xml(address@hidden,address@hidden,address@hidden,address@hidden,address@hidden);
+        my $record=MARC::Record::new_from_xml($xml, 'UTF-8');
+        # 
 # MARC::Record built => now, record in DB
        # check for a duplicate
        my ($duplicateauthid,$duplicateauthvalue) = 
FindDuplicate($record,$authtypecode) if ($op eq "add") && (!$is_a_modif);
@@ -366,11 +364,9 @@
        # build indicator hash.
        my @ind_tag = $input->param('ind_tag');
        my @indicator = $input->param('indicator');
-       my %indicators;
-       for (my $i=0;$i<=$#ind_tag;$i++) {
-               $indicators{$ind_tag[$i]} = $indicator[$i];
-       }
-       my $record = 
AUTHhtml2marc($dbh,address@hidden,address@hidden,address@hidden,%indicators);
+       my $xml = 
AUTHhtml2xml(address@hidden,address@hidden,address@hidden,address@hidden,address@hidden);
+        my $record=MARC::Record::new_from_xml($xml, 'UTF-8');
+        # 
        my $field = MARC::Field->new("$addedfield",'','','a'=> "");
        $record->append_fields($field);
 




reply via email to

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