koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.46,1.47


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.46,1.47
Date: Thu, 30 Sep 2004 08:52:31 -0700

Update of /cvsroot/koha/koha/acqui.simple
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25070/acqui.simple

Modified Files:
        addbiblio.pl 
Log Message:
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).

Index: addbiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/addbiblio.pl,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** addbiblio.pl        23 Sep 2004 16:12:06 -0000      1.46
--- addbiblio.pl        30 Sep 2004 15:52:28 -0000      1.47
***************
*** 415,424 ****
        my $end=0;
        my $started;
!       for (my $i=0;$i<=$#tags;$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.
        splice(@tags,$end+1,0,'');
        splice(@subfields,$end+1,0,'');
--- 415,425 ----
        my $end=0;
        my $started;
!       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);
        }
! #     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,'');




reply via email to

[Prev in Thread] Current Thread [Next in Thread]