@@ -, +, @@ $ kshell k$ prove t/db_dependent/Filter_MARC_ViewPolicy.t --- Koha/Filter/MARC/ViewPolicy.pm | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) --- a/Koha/Filter/MARC/ViewPolicy.pm +++ a/Koha/Filter/MARC/ViewPolicy.pm @@ -78,10 +78,12 @@ sub filter { push @records, $precord; } + my $params = $self->params; + my $interface = $params->{options}->{interface} // 'opac'; + my $frameworkcode = $params->{options}->{frameworkcode} // q{}; + foreach my $current_record (@records) { my $result = $current_record; - my $interface = $self->{options}->{interface} // 'opac'; - my $frameworkcode = $self->{options}->{frameworkcode} // q{}; my $hide = _should_hide_on_interface(); my $marcsubfieldstructure = GetMarcStructure( 0, $frameworkcode, { unsafe => 1 } ); @@ -153,16 +155,6 @@ sub _filter_field { return; } -sub initialize { - my $self = shift; - my $param = shift; - - my $options = $param->{options}; - $self->{options} = $options; - $self->Koha::RecordProcessor::Base::initialize($param); - return; -} - # Copied and modified from 3.10.x help file # marc_subfields_structure.hidden # allows you to select from 19 possible visibility conditions, 17 of which are implemented. They are the following: --