From 8576d4f6a5f0d8739c70814cba56ee42b34d167d Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 2 Sep 2016 15:49:22 +0200 Subject: [PATCH] Bug 8995: Remove useless code OpenURL link display is done in XSLT only, so this code is now useless --- opac/opac-detail.pl | 14 -------------- opac/opac-search.pl | 6 +----- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 146b5e4..98afe3e 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -1155,18 +1155,4 @@ $template->param( 'OpacLocationBranchToDisplayShelving' => C4::Context->preference('OpacLocationBranchToDisplayShelving'), ); -# OpenURL -if (C4::Context->preference('OPACShowOpenURL')) { - my ($biblio) = GetBiblioItemByBiblioNumber($biblionumber); - my @itypes = split( /\s/, C4::Context->preference('OPACOpenURLItemTypes') ); - if (grep /^$biblio->{itemtype}$/, @itypes) { - $template->param( - OPACShowOpenURL => 1, - OpenURLResolverURL => C4::Context->preference('OpenURLResolverURL'), - OpenURLText => C4::Context->preference('OpenURLText'), - OpenURLImageLocation => C4::Context->preference('OpenURLImageLocation') - ); - } -} - output_html_with_http_headers $query, $cookie, $template->output; diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 5a93cc6..67bba53 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -673,11 +673,7 @@ for (my $i=0;$i<@servers;$i++) { $res->{'incart'} = 1; } - if (C4::Context->preference('COinSinOPACResults') - or C4::Context->preference('OPACShowOpenURL')) { - if (grep /^$res->{itemtype}$/, @OpenURL_itypes) { - $res->{ShowOpenURL} = 1; - } + if (C4::Context->preference('COinSinOPACResults')) { my $record = GetMarcBiblio($res->{'biblionumber'}); $res->{coins} = GetCOinSBiblio($record); } -- 2.1.4