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.47,1.48


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.47,1.48
Date: Mon, 04 Oct 2004 13:02:39 -0700

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

Modified Files:
        addbiblio.pl 
Log Message:
(bugfix for previous commit, that was wrong)
when repeating a repeatable field, the new field is now :
* 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.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** addbiblio.pl        30 Sep 2004 15:52:28 -0000      1.47
--- addbiblio.pl        4 Oct 2004 20:02:36 -0000       1.48
***************
*** 416,424 ****
        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,'');
--- 416,424 ----
        my $started;
        for (my $i=$#tags;$i>0;$i--) {
!               $end=$i if ($end eq 0 && $tags[$i] == $addedfield);
!               $start=$i if ($end>0 && $tags[$i] eq $addedfield);
!               last if ($end>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,'');
***************
*** 439,442 ****
--- 439,443 ----
        }
        my $record = 
MARChtml2marc($dbh,address@hidden,address@hidden,address@hidden,%indicators);
+       warn "R=>".$record->as_formatted;
        build_tabs ($template, $record, $dbh,$encoding);
        build_hidden_data;




reply via email to

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