@@ -, +, @@ --- Koha/Biblio.pm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) --- a/Koha/Biblio.pm +++ a/Koha/Biblio.pm @@ -127,10 +127,12 @@ sub record_schema { my $record = $biblio->metadata_record( { - [ embed_items => 1|0, - opac => 1|0, - patron => $patron, - expand_coded_fields => 1|0 ] + [ + embed_items => 1 | 0, + interface => 'opac' | 'intranet', + patron => $patron, + expand_coded_fields => 1 | 0 + ] } ); @@ -146,18 +148,18 @@ sub metadata_record { my $record = $self->metadata->record; - if ( $params->{embed_items} or $params->{opac} ) { + if ( $params->{embed_items} or $params->{interface} ) { # There's need for a RecordProcessor, let's do it! my @filters; my $options = { - interface => 'opac', + interface => $params->{interface}, frameworkcode => $self->frameworkcode, }; if ( $params->{embed_items} ) { push @filters, 'EmbedItems'; - if ( $params->{opac} ) { + if ( $params->{interface} eq 'opac' ) { $options->{items} = $self->items->filter_by_visible_in_opac( { ( @@ -171,7 +173,7 @@ sub metadata_record { } } - if ( $params->{opac} ) { + if ( $params->{interface} ) { push @filters, 'ViewPolicy'; } --