[Koha-cvs] koha/C4 Biblio.pm [rel_3_0]

LAURIN arnaud alaurin at ouestprovence.fr
Tue Dec 19 17:45:56 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	LAURIN arnaud <alaurin>	06/12/19 16:45:56

Modified files:
	C4             : Biblio.pm 

Log message:
	bugfixing, for zebra and authorities

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Biblio.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.178.2.39&r2=1.178.2.40

Patches:
Index: Biblio.pm
===================================================================
RCS file: /sources/koha/koha/C4/Biblio.pm,v
retrieving revision 1.178.2.39
retrieving revision 1.178.2.40
diff -u -b -r1.178.2.39 -r1.178.2.40
--- Biblio.pm	8 Dec 2006 17:55:44 -0000	1.178.2.39
+++ Biblio.pm	19 Dec 2006 16:45:56 -0000	1.178.2.40
@@ -33,7 +33,7 @@
 use vars qw($VERSION @ISA @EXPORT);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.178.2.39 $' =~ /\d+/g; shift(@v).".".join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.178.2.40 $' =~ /\d+/g; shift(@v).".".join( "_", map { sprintf "%03d", $_ } @v ); };
 
 @ISA = qw( Exporter );
 
@@ -1421,10 +1421,7 @@
     $marcxml =~ s/\x1d//g;
     $marcxml =~ s/\x0f//g;
     my $record = MARC::Record->new();
-    $record =
-      MARC::Record::new_from_xml( $marcxml, "utf8",
-        C4::Context->preference('marcflavour') )
-      if $marcxml;
+    $record = MARC::Record::new_from_xml( $marcxml, "utf8",C4::Context->preference('marcflavour')) if $marcxml;
     return $record;
 }
 
@@ -1581,7 +1578,7 @@
         $maxtag = "111"; 
     }
     else {    # assume unimarc if not marc21
-        $mintag = "700";
+        $mintag = "701";
         $maxtag = "712";
     }
 
@@ -1591,11 +1588,18 @@
         next unless $field->tag() >= $mintag && $field->tag() <= $maxtag;
         my %hash;
         my @subfields = $field->subfields();
+        my $count_auth = 0;
+        my $and ;
         for my $authors_subfield (@subfields) {
+        	if ($count_auth ne '0'){
+        	$and = " and au:";
+        	}
+            $count_auth++;
             my $subfieldcode     = $authors_subfield->[0];
             my $value            = $authors_subfield->[1];
             $hash{'tag'}         = $field->tag;
             $hash{value}        .= $value . " " if ($subfieldcode != 9) ;
+            $hash{link}        .= $value if ($subfieldcode eq 9);
         }
         push @marcauthors, \%hash;
     }
@@ -3568,8 +3572,11 @@
 
 =cut
 
-# $Id: Biblio.pm,v 1.178.2.39 2006/12/08 17:55:44 toins Exp $
+# $Id: Biblio.pm,v 1.178.2.40 2006/12/19 16:45:56 alaurin Exp $
 # $Log: Biblio.pm,v $
+# Revision 1.178.2.40  2006/12/19 16:45:56  alaurin
+# bugfixing, for zebra and authorities
+#
 # Revision 1.178.2.39  2006/12/08 17:55:44  toins
 # GetMarcAuthors now get authors for all subfields
 #





More information about the Koha-cvs mailing list