From d4b74a501357f68530457234f25b1c46ab06a853 Mon Sep 17 00:00:00 2001 From: tipaul Date: Thu, 30 Sep 2004 15:52:28 +0000 Subject: [PATCH] when repeating a repeatable field, the new field is now : * empty * created AFTER the existing field(s) This is more logic when adding subjects, from most to less important (or author, or anything else). --- acqui.simple/addbiblio.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/acqui.simple/addbiblio.pl b/acqui.simple/addbiblio.pl index 5c93660cf5..51f335e066 100755 --- a/acqui.simple/addbiblio.pl +++ b/acqui.simple/addbiblio.pl @@ -414,12 +414,13 @@ if ($op eq "addbiblio") { my $start=0; my $end=0; my $started; - for (my $i=0;$i<=$#tags;$i++) { + for (my $i=$#tags;$i>0;$i--) { $start=$i if ($start eq 0 && $tags[$i] == $addedfield); $end=$i if ($start>0 && $tags[$i] eq $addedfield); last if ($start>0 && $tags[$i] ne $addedfield); } -# add an empty line in all arrays. This forces a new field in MARC::Record. +# warn "ST : $addedfield => $start / $end"; + # add an empty line in all arrays. This forces a new field in MARC::Record. splice(@tags,$end+1,0,''); splice(@subfields,$end+1,0,''); splice(@values,$end+1,0,''); -- 2.39.2