(bug #2904) this patch is a fix from previous
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Tue, 17 Feb 2009 15:23:28 +0000 (16:23 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 17 Feb 2009 15:40:08 +0000 (16:40 +0100)
in the previous patch the field used for link "name" was 856$z, but the unimarc doesn't specify this, it say to use the 856$2 field.
This patch make koha to use the 856$2.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
C4/Biblio.pm

index cee44d5..9fe8872 100644 (file)
@@ -1273,11 +1273,11 @@ sub GetMarcUrls {
                $marcurl = {  MARCURL => $url,
                       notes => \@notes,
             };
-            $marcurl->{'linktext'} = $link || $s3 || C4::Context->preference('URLLinkText') || $url ;;
+            $marcurl->{'linktext'} = $link || $s3 || C4::Context->preference('URLLinkText') || $url ;
             $marcurl->{'part'} = $s3 if($link);
             $marcurl->{'toc'} = 1 if($s3 =~ /^[Tt]able/) ;
         } else {
-            $marcurl->{'linktext'} = $field->subfield('z') || C4::Context->preference('URLLinkText') || $url;
+            $marcurl->{'linktext'} = $field->subfield('2') || C4::Context->preference('URLLinkText') || $url;
             $marcurl->{'MARCURL'} = $url ;
         }
         push @marcurls, $marcurl;