[Koha-cvs] koha/authorities authorities.pl [rel_2_2]
Joshua Ferraro
jmf at kados.org
Sat Mar 4 18:18:10 CET 2006
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Joshua Ferraro <kados at savannah.gnu.org> 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,\@tags,\@subfields,\@values,%indicators);
+ my $xml = AUTHhtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);
+ 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,\@tags,\@subfields,\@values,%indicators);
+ my $xml = AUTHhtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);
+ my $record=MARC::Record::new_from_xml($xml, 'UTF-8');
+ #
my $field = MARC::Field->new("$addedfield",'','','a'=> "");
$record->append_fields($field);
More information about the Koha-cvs
mailing list