@@ -, +, @@ --- Koha/Biblio.pm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) --- a/Koha/Biblio.pm +++ a/Koha/Biblio.pm @@ -24,7 +24,6 @@ use URI; use URI::Escape qw( uri_escape_utf8 ); use C4::Koha qw( GetNormalizedISBN ); -use C4::XSLT qw( transformMARCXML4XSLT ); use Koha::Database; use Koha::DateUtils qw( dt_from_string ); @@ -42,6 +41,7 @@ use Koha::Items; use Koha::Libraries; use Koha::Old::Checkouts; use Koha::Recalls; +use Koha::RecordProcessor; use Koha::Suggestions; use Koha::Subscriptions; use Koha::SearchEngine; @@ -927,9 +927,19 @@ sub get_marc_notes { my $marcflavour = C4::Context->preference('marcflavour'); my $opac = $params->{opac}; - my $scope = $marcflavour eq "UNIMARC"? '3..': '5..'; - my @marcnotes; + my $record = $self->metadata->record; + my $record_processor = Koha::RecordProcessor->new( + { + filters => ( 'ViewPolicy', 'AuthorizedValues' ), + options => { + interface => $opac ? 'opac' : 'intranet' , + frameworkcode => $self->frameworkcode + } + } + ); + $record_processor->process($record); + my $scope = $marcflavour eq "UNIMARC"? '3..': '5..'; #MARC21 specs indicate some notes should be private if first indicator 0 my %maybe_private = ( 541 => 1, @@ -941,9 +951,8 @@ sub get_marc_notes { my %hiddenlist = map { $_ => 1 } split( /,/, C4::Context->preference('NotesToHide')); - my $record = $self->metadata->record; - $record = transformMARCXML4XSLT( $self->biblionumber, $record, $opac ); + my @marcnotes; foreach my $field ( $record->field($scope) ) { my $tag = $field->tag(); next if $hiddenlist{ $tag }; --