[Koha-patches] [PATCH] Bug fix : use delete_field/insert_grouped_field rather than replace_with
Galen Charlton
galen.charlton at liblime.com
Sat Aug 9 17:53:14 CEST 2008
From: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>
replace_with maight have unexpected behaviour.
Has to test merge_authority.pl
Signed-off-by: Galen Charlton <galen.charlton at liblime.com>
---
C4/AuthoritiesMarc.pm | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm
index 011bcf1..427fdb6 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.5.GIT
More information about the Koha-patches
mailing list