View | Details | Raw Unified | Return to bug 15870
Collapse All | Expand All

(-)a/Koha/Filter/MARC/ViewPolicy.pm (-10 / +2 lines)
Lines 78-86 sub filter { Link Here
78
        push @records, $precord;
78
        push @records, $precord;
79
    }
79
    }
80
80
81
    my @results;
82
    foreach my $current_record (@records) {
81
    foreach my $current_record (@records) {
83
        my $result        = $current_record->clone();
82
        my $result        = $current_record;
84
        my $interface     = $self->{options}->{interface} // 'opac';
83
        my $interface     = $self->{options}->{interface} // 'opac';
85
        my $frameworkcode = $self->{options}->{frameworkcode} // q{};
84
        my $frameworkcode = $self->{options}->{frameworkcode} // q{};
86
        my $hide          = _should_hide_on_interface();
85
        my $hide          = _should_hide_on_interface();
Lines 103-117 sub filter { Link Here
103
                }
102
                }
104
            );
103
            );
105
        }
104
        }
106
        push @results, $result;
107
    }
108
109
    if ( scalar @results == 1 ) {
110
        return $results[0];
111
    }
112
    else {
113
        return \@results;
114
    }
105
    }
106
    return;
115
}
107
}
116
108
117
sub _filter_field {
109
sub _filter_field {
(-)a/Koha/RecordProcessor.pm (-5 / +2 lines)
Lines 152-165 sub process { Link Here
152
152
153
    return unless defined $record;
153
    return unless defined $record;
154
154
155
    my $newrecord = $record;
156
157
    foreach my $filterobj (@{$self->filters}) {
155
    foreach my $filterobj (@{$self->filters}) {
158
        next unless $filterobj;
156
        next unless $filterobj;
159
        $newrecord = $filterobj->filter($newrecord);
157
        $filterobj->filter($record);
160
    }
158
    }
161
159
162
    return $newrecord;
160
    return $record;
163
}
161
}
164
162
165
sub DESTROY {
163
sub DESTROY {
166
- 

Return to bug 15870