|
Lines 24-30
use URI;
Link Here
|
| 24 |
use URI::Escape qw( uri_escape_utf8 ); |
24 |
use URI::Escape qw( uri_escape_utf8 ); |
| 25 |
|
25 |
|
| 26 |
use C4::Koha qw( GetNormalizedISBN ); |
26 |
use C4::Koha qw( GetNormalizedISBN ); |
| 27 |
use C4::XSLT qw( transformMARCXML4XSLT ); |
|
|
| 28 |
|
27 |
|
| 29 |
use Koha::Database; |
28 |
use Koha::Database; |
| 30 |
use Koha::DateUtils qw( dt_from_string ); |
29 |
use Koha::DateUtils qw( dt_from_string ); |
|
Lines 42-47
use Koha::Items;
Link Here
|
| 42 |
use Koha::Libraries; |
41 |
use Koha::Libraries; |
| 43 |
use Koha::Old::Checkouts; |
42 |
use Koha::Old::Checkouts; |
| 44 |
use Koha::Recalls; |
43 |
use Koha::Recalls; |
|
|
44 |
use Koha::RecordProcessor; |
| 45 |
use Koha::Suggestions; |
45 |
use Koha::Suggestions; |
| 46 |
use Koha::Subscriptions; |
46 |
use Koha::Subscriptions; |
| 47 |
use Koha::SearchEngine; |
47 |
use Koha::SearchEngine; |
|
Lines 927-935
sub get_marc_notes {
Link Here
|
| 927 |
my $marcflavour = C4::Context->preference('marcflavour'); |
927 |
my $marcflavour = C4::Context->preference('marcflavour'); |
| 928 |
my $opac = $params->{opac}; |
928 |
my $opac = $params->{opac}; |
| 929 |
|
929 |
|
| 930 |
my $scope = $marcflavour eq "UNIMARC"? '3..': '5..'; |
930 |
my $record = $self->metadata->record; |
| 931 |
my @marcnotes; |
931 |
my $record_processor = Koha::RecordProcessor->new( |
|
|
932 |
{ |
| 933 |
filters => ( 'ViewPolicy', 'AuthorizedValues' ), |
| 934 |
options => { |
| 935 |
interface => $opac ? 'opac' : 'intranet' , |
| 936 |
frameworkcode => $self->frameworkcode |
| 937 |
} |
| 938 |
} |
| 939 |
); |
| 940 |
$record_processor->process($record); |
| 932 |
|
941 |
|
|
|
942 |
my $scope = $marcflavour eq "UNIMARC"? '3..': '5..'; |
| 933 |
#MARC21 specs indicate some notes should be private if first indicator 0 |
943 |
#MARC21 specs indicate some notes should be private if first indicator 0 |
| 934 |
my %maybe_private = ( |
944 |
my %maybe_private = ( |
| 935 |
541 => 1, |
945 |
541 => 1, |
|
Lines 941-949
sub get_marc_notes {
Link Here
|
| 941 |
|
951 |
|
| 942 |
my %hiddenlist = map { $_ => 1 } |
952 |
my %hiddenlist = map { $_ => 1 } |
| 943 |
split( /,/, C4::Context->preference('NotesToHide')); |
953 |
split( /,/, C4::Context->preference('NotesToHide')); |
| 944 |
my $record = $self->metadata->record; |
|
|
| 945 |
$record = transformMARCXML4XSLT( $self->biblionumber, $record, $opac ); |
| 946 |
|
954 |
|
|
|
955 |
my @marcnotes; |
| 947 |
foreach my $field ( $record->field($scope) ) { |
956 |
foreach my $field ( $record->field($scope) ) { |
| 948 |
my $tag = $field->tag(); |
957 |
my $tag = $field->tag(); |
| 949 |
next if $hiddenlist{ $tag }; |
958 |
next if $hiddenlist{ $tag }; |
| 950 |
- |
|
|