From af22bfb7d96f93b8f0a5d059e5f9abea15e2285a 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 Signed-off-by: Magnus Enger --- 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 7964fab..8e9aa59 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -1222,18 +1222,4 @@ $template->param( 'OpacLocationBranchToDisplay' => C4::Context->preference('OpacLocationBranchToDisplay'), ); -# 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 ad78df6..eb2728e 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -681,11 +681,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({ biblionumber => $res->{'biblionumber'} }); $res->{coins} = GetCOinSBiblio($record); } -- 2.1.4