From 09d82dc0aab369ff8a46a7db65f2baf5fd726470 Mon Sep 17 00:00:00 2001 From: thd Date: Mon, 12 Dec 2005 14:25:51 +0000 Subject: [PATCH] Reverse array filled with elements from repeated subfields to avoid last to first concatenation of elements in Koha DB.- --- C4/Biblio.pm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 9ceb656737..a3da03b64a 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -602,7 +602,10 @@ sub MARCmarc2kohaOneField { foreach my $field ( $record->field($tagfield) ) { if ($field->tag()<10) { if ($result->{$kohafield}) { - $result->{$kohafield} .= " | ".$field->data(); + # Reverse array filled with elements from repeated subfields + # from first to last to avoid last to first concatenation of + # elements in Koha DB. -- thd. + $result->{$kohafield} .= " | ".reverse($field->data()); } else { $result->{$kohafield} = $field->data(); } @@ -2881,7 +2884,13 @@ Paul POULAIN paul.poulain@free.fr # $Id$ # $Log$ -# Revision 1.132 2005/10/26 09:12:33 tipaul +# Revision 1.133 2005/12/12 14:25:51 thd +# +# +# Reverse array filled with elements from repeated subfields +# to avoid last to first concatenation of elements in Koha DB.- +# +# Revision 1.132 2005-10-26 09:12:33 tipaul # big commit, still breaking things... # # * synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not be modified deeply. @@ -2961,4 +2970,4 @@ Paul POULAIN paul.poulain@free.fr # IMPORTANT NOTE : you need MARC::XML package (http://search.cpan.org/~esummers/MARC-XML-0.7/lib/MARC/File/XML.pm), that requires a recent version of MARC::Record # Updatedatabase stores the iso2709 data in biblioitems.marc field & an xml version in biblioitems.marcxml Not sure we will keep it when releasing the stable version, but I think it's a good idea to have something readable in sql, at least for development stage. -# tipaul cutted previous commit notes \ No newline at end of file +# tipaul cutted previous commit notes -- 2.39.5