From 0e759ee603d617da49efe91b2a5a95b97436376a Mon Sep 17 00:00:00 2001 From: Shi Yao Wang Date: Tue, 26 Jul 2022 10:08:33 -0400 Subject: [PATCH] Bug 17385: Add missing imports and equivalent code for GetMarcBiblio --- basket/basket.pl | 2 +- catalogue/export.pl | 5 +++-- opac/opac-export.pl | 3 ++- virtualshelves/shelves.pl | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/basket/basket.pl b/basket/basket.pl index 40e00bceeb..272bdc7bcd 100755 --- a/basket/basket.pl +++ b/basket/basket.pl @@ -27,7 +27,7 @@ use C4::Biblio qw( ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::XSLT; +use C4::XSLT qw( CustomXSLTExportList ); use Koha::AuthorisedValues; diff --git a/catalogue/export.pl b/catalogue/export.pl index 541000b037..34bf7857e1 100755 --- a/catalogue/export.pl +++ b/catalogue/export.pl @@ -8,7 +8,7 @@ use C4::Biblio qw( GetMarcControlnumber ); use CGI qw ( -utf8 ); use C4::Ris qw( marc2ris ); use C4::XSLT qw( XSLTParse4Display ); - +use Koha::Biblios; @@ -92,7 +92,8 @@ if ($op eq "export") { my $biblionumber = $query->param("bib"); if ($biblionumber){ my $xslFile = $query->param("file"); - my $marc = GetMarcBiblio( { biblionumber => $biblionumber, embed_items => 1 } ); + my $biblio = Koha::Biblios->find($biblionumber); + my $marc = $biblio->metadata->record( { embed_items => 1 } ); my $format=$query->param("format")||'txt'; my @hiddenitems; diff --git a/opac/opac-export.pl b/opac/opac-export.pl index 7d5920de33..af951c5563 100755 --- a/opac/opac-export.pl +++ b/opac/opac-export.pl @@ -142,7 +142,8 @@ elsif ( $format =~ /isbd/ ) { elsif ($format =~ /html/ ) { if ($biblionumber){ my $xslFile = $query->param("file"); - $marc = C4::Biblio::GetMarcBiblio({biblionumber => $biblionumber}); + my $biblio = Koha::Biblios->find($biblionumber); + $marc = $biblio->metadata->record; my @hiddenitems; $marc = XSLTParse4Display( diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index aad027b485..f061970f7c 100755 --- a/virtualshelves/shelves.pl +++ b/virtualshelves/shelves.pl @@ -30,7 +30,7 @@ use C4::Koha qw( ); use C4::Members; use C4::Output qw( pagination_bar output_html_with_http_headers ); -use C4::XSLT qw( XSLTParse4Display ); +use C4::XSLT qw( XSLTParse4Display CustomXSLTExportList ); use Koha::Biblios; use Koha::Biblioitems; -- 2.25.1