Bug 6135: insert fields ordered in C4::biblio:ModBiblioMarc
authorStéphane Delaune <stephane.delaune@biblibre.com>
Fri, 13 May 2011 14:19:10 +0000 (16:19 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 1 Aug 2011 03:23:37 +0000 (15:23 +1200)
Fixing order subfields for biblionumber and biblioitemnumber

BibLibre MT5951

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
C4/Biblio.pm

index a91562c..96baaef 100644 (file)
@@ -3071,7 +3071,7 @@ sub _koha_marc_update_bib_ids {
         # drop old field and create new one...
         $old_field = $record->field($biblio_tag);
         $record->delete_field($old_field) if $old_field;
-        $record->append_fields($new_field);
+        $record->insert_fields_ordered($new_field);
 
         # deal with biblioitemnumber
         if ( $biblioitem_tag < 10 ) {
@@ -3487,7 +3487,7 @@ sub ModBiblioMarc {
         }
         substr( $string, 22, 6, "frey50" );
         unless ( $record->subfield( 100, "a" ) ) {
-            $record->insert_grouped_field( MARC::Field->new( 100, "", "", "a" => $string ) );
+            $record->insert_fields_ordered( MARC::Field->new( 100, "", "", "a" => $string ) );
         }
     }