From f6c35a499374f369338661e5ed174a54f09496f4 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 26 May 2022 12:56:39 +0000 Subject: [PATCH] Bug 28371: (follow-up) Fetch avs per framework --- C4/XSLT.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index ab39b5855e..95b3ec9da8 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -75,7 +75,7 @@ sub transformMARCXML4XSLT { my $marcflavour = C4::Context->preference('marcflavour'); # FIXME: This should properly use the cache in the future, but is here to save on performance where possible - $av = getAuthorisedValues4MARCSubfields("") unless $av; + $av = getAuthorisedValues4MARCSubfields($frameworkcode) unless $av; $branches = { map { $_->branchcode => $_->branchname } Koha::Libraries->search({}, { order_by => 'branchname' })->as_list } unless $branches; $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } } unless $itemtypes; @@ -289,8 +289,7 @@ sub XSLTParse4Display { my $xslfilename = get_xsl_filename( $xslsyspref); # grab the XML, run it through our stylesheet, push it out to the browser - my $authorised_values = getAuthorisedValues4MARCSubfields(""); - my $record = transformMARCXML4XSLT($biblionumber, $orig_record, undef, $branches, $itemtypes, $authorised_values ); + my $record = transformMARCXML4XSLT($biblionumber, $orig_record, undef, $branches, $itemtypes); my $itemsxml; if ( $xslsyspref eq "OPACXSLTDetailsDisplay" || $xslsyspref eq "XSLTDetailsDisplay" || $xslsyspref eq "XSLTResultsDisplay" ) { $itemsxml = ""; #We don't use XSLT for items display on these pages -- 2.30.2