[Koha-patches] [PATCH] Bug fix : use delete_field/insert_grouped_field rather than replace_with
Henri-Damien LAURENT
henridamien.laurent at biblibre.com
Sat Aug 9 10:27:29 CEST 2008
replace_with maight have unexpected behaviour.
Has to test merge_authority.pl
---
C4/AuthoritiesMarc.pm | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm
index 0f5f49d..7c4ac1a 100644
--- a/C4/AuthoritiesMarc.pm
+++ b/C4/AuthoritiesMarc.pm
@@ -1226,7 +1226,8 @@ sub merge {
foreach my $subfield (@record_to) {
$field_to->add_subfields($subfield->[0] =>$subfield->[1]);
}
- $field->replace_with($field_to);
+ $marcrecord->delete_field($field);
+ $marcrecord->insert_grouped_field($field_to);
$update=1;
}
}#for each tag
--
1.5.4.3
More information about the Koha-patches
mailing list