koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 AuthoritiesMarc.pm,1.9.2.3,1.9.2.4


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 AuthoritiesMarc.pm,1.9.2.3,1.9.2.4
Date: Mon, 30 May 2005 04:24:17 -0700

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17286/C4

Modified Files:
      Tag: rel_2_2
        AuthoritiesMarc.pm 
Log Message:
fixing a bug : when a field was repeated, the last field was also repeated. 
(Was due to the "empty" field in html between fields : to separate fields, in 
html, an empty field is automatically added. in AUTHhtml2marc, this empty field 
was not discarded correctly)

Index: AuthoritiesMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/AuthoritiesMarc.pm,v
retrieving revision 1.9.2.3
retrieving revision 1.9.2.4
diff -C2 -r1.9.2.3 -r1.9.2.4
*** AuthoritiesMarc.pm  28 Apr 2005 08:45:33 -0000      1.9.2.3
--- AuthoritiesMarc.pm  30 May 2005 11:24:15 -0000      1.9.2.4
***************
*** 656,660 ****
--- 656,662 ----
                        if (@$rtags[$i] <10) {
                                $prevvalue= @$rvalues[$i];
+                               undef $field;
                        } else {
+                               undef $prevvalue;
                                $field = MARC::Field->new( (sprintf 
"%03s",@$rtags[$i]), substr(address@hidden,0,1),substr(address@hidden,1,1), 
@$rsubfields[$i] => @$rvalues[$i]);
                        }
***************
*** 664,668 ****
                                address@hidden;
                        } else {
!                               if (@$rvalues[$i]) {
                                        $field->add_subfields(@$rsubfields[$i] 
=> @$rvalues[$i]);
                                }
--- 666,670 ----
                                address@hidden;
                        } else {
!                               if (length(@$rvalues[$i])>0) {
                                        $field->add_subfields(@$rsubfields[$i] 
=> @$rvalues[$i]);
                                }
***************
*** 672,677 ****
        }
        # the last has not been included inside the loop... do it now !
!       $record->add_fields($field);
! #     warn $record->as_formatted;
        return $record;
  }
--- 674,678 ----
        }
        # the last has not been included inside the loop... do it now !
!       $record->add_fields($field) if $field;
        return $record;
  }
***************
*** 911,914 ****
--- 912,918 ----
  # $Id$
  # $Log$
+ # Revision 1.9.2.4  2005/05/30 11:24:15  tipaul
+ # fixing a bug : when a field was repeated, the last field was also repeated. 
(Was due to the "empty" field in html between fields : to separate fields, in 
html, an empty field is automatically added. in AUTHhtml2marc, this empty field 
was not discarded correctly)
+ #
  # Revision 1.9.2.3  2005/04/28 08:45:33  tipaul
  # porting FindDuplicate feature for authorities from HEAD to rel_2_2, works 
correctly now.




reply via email to

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