From bd858bb9e2b9a8d4889f7e41f5a6254c4e8bf756 Mon Sep 17 00:00:00 2001
From: Josef Moravec <josef.moravec@gmail.com>
Date: Mon, 11 Mar 2019 21:27:52 +0000
Subject: [PATCH] Bug 8995: (follow-up) Adapt to current codebase

---
 C4/XSLT.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/C4/XSLT.pm b/C4/XSLT.pm
index a8e7725..d4deee0 100644
--- a/C4/XSLT.pm
+++ b/C4/XSLT.pm
@@ -247,7 +247,8 @@ sub XSLTParse4Display {
 
     $variables ||= {};
     if (C4::Context->preference('OPACShowOpenURL')) {
-        my ($biblio) = GetBiblioItemByBiblioNumber($biblionumber);
+        my $biblio_object = Koha::Biblios->find($biblionumber);
+        my $biblio = $biblio_object->biblioitem->unblessed;
         my @itypes = split( /\s/, C4::Context->preference('OPACOpenURLItemTypes') );
         if (grep /^$biblio->{itemtype}$/, @itypes) {
             $variables->{OpenURLResolverURL} =
-- 
2.1.4