Bug 15777 - Refactor and fix the RecordProcessor class

TEST PLAN
---------
1) Apply all three patches
2) prove -v t/RecordProcessor.t
   -- all should be successful
3) run koha qa test tools

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This commit is contained in:
Mark Tompsett 2016-02-11 23:30:36 -05:00 committed by Brendan Gallagher
parent 84ca3db6c7
commit 0195a2af99

View file

@ -103,13 +103,14 @@ sub new {
: $param->{filters};
my @filters = ( );
foreach my $filter (@{ $req_filters }) {
next unless $filter;
my $filter_module = $filter =~ m/:/ ? $filter : "Koha::Filter::${schema}::${filter}";
foreach my $filter_name (@{ $req_filters }) {
next unless $filter_name;
# Fully qualify the module name.
my $filter_module = $filter_name =~ m/:/ ? $filter_name : "Koha::Filter::${schema}::${filter_name}";
if (can_load( modules => { $filter_module => undef } )) {
my $object = $filter_module->new();
$filter_module->initialize($param);
push @filters, $object;
my $filter = $filter_module->new();
$filter->initialize($param);
push @filters, $filter;
}
}