From c52d4866ebc76dc0e4d361d45930091f83676704 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 27 Aug 2021 09:32:12 +0100 Subject: [PATCH] Bug 11175: (QA follow-up) Fixes for bug 12561 Bug 12561 changed the prototype for XSLTParse4Display so this patcha accounts for the additional calls to that method introduced in this patchset. Signed-off-by: Martin Renvoize Signed-off-by: Andrew Nugged --- catalogue/detail.pl | 27 ++++++++++++++------------- opac/opac-detail.pl | 27 ++++++++++++++------------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 0a722d2bd6..2495352c6b 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -215,20 +215,21 @@ foreach my $subscription (@subscriptions) { my $showcomp = C4::Context->preference('ShowComponentRecords'); if ( $showcomp eq 'both' || $showcomp eq 'staff' ) { if ( my $components = $biblio->get_marc_components(300) ) { - my $xslparts = C4::Context->preference('XSLTResultsDisplay') || "default"; - if ( $xslparts ) { - my $parts; - for my $part ( @{$components} ) { - $part = MARC::Record->new_from_xml( $part, 'UTF-8' ); - - push @{$parts}, - XSLTParse4Display( 1, $part, "XSLTResultsDisplay", 1, - undef, $sysxml, $xslparts, $lang, ); - } - $template->param( - ComponentParts => $parts - ); + my $parts; + for my $part ( @{$components} ) { + $part = MARC::Record->new_from_xml( $part, 'UTF-8' ); + + push @{$parts}, + XSLTParse4Display( + { + biblionumber => $biblionumber, + record => $part, + xsl_syspref => "XSLTResultsDisplay", + fix_amps => 1, + } + ); } + $template->param( ComponentParts => $parts ); } } diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index a20852e9f8..05f8967dad 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -661,20 +661,21 @@ my $max_items_to_display = C4::Context->preference('OpacMaxItemsToDisplay') // 5 my $showcomp = C4::Context->preference('ShowComponentRecords'); if ( $showcomp eq 'both' || $showcomp eq 'opac' ) { if ( my $components = $biblio->get_marc_components(300) ) { - my $xslparts = C4::Context->preference('OPACXSLTResultsDisplay') || "default"; - if ( $xslparts ) { - my $parts; - for my $part ( @{$components} ) { - $part = MARC::Record->new_from_xml( $part, 'UTF-8' ); - - push @{$parts}, - XSLTParse4Display( 1, $part, "OPACXSLTResultsDisplay", 1, - undef, $sysxml, $xslparts, $lang, ); - } - $template->param( - ComponentParts => $parts - ); + my $parts; + for my $part ( @{$components} ) { + $part = MARC::Record->new_from_xml( $part, 'UTF-8' ); + + push @{$parts}, + XSLTParse4Display( + { + biblionumber => $biblionumber, + record => $part, + xsl_syspref => 'OPACXSLTResultsDisplay', + fix_amps => 1, + } + ); } + $template->param( ComponentParts => $parts ); } } -- 2.20.1