bug 2904: fix display of URLs in UNIMARC
authorGalen Charlton <galen.charlton@liblime.com>
Fri, 6 Mar 2009 18:17:39 +0000 (12:17 -0600)
committerGalen Charlton <galen.charlton@liblime.com>
Fri, 6 Mar 2009 18:18:12 +0000 (12:18 -0600)
This based on a patch by Nahuel ANGELINETTI; done to
merge changes with Mason's patch for 2951.  The original
patch description is:

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 fi
This patch make koha to use the 856$2."

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
C4/Biblio.pm

index 786b351..f528be1 100644 (file)
@@ -1159,7 +1159,7 @@ sub GetMarcUrls {
                 $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;