From: Sven Schöling Date: Fri, 17 Jun 2016 12:45:36 +0000 (+0200) Subject: CsvImport::Base: benutzte header korrekt setzen X-Git-Tag: release-3.4.1~37 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e78a50fca24269c2fc4d516f9064389732147ae1;p=kivitendo-erp.git CsvImport::Base: benutzte header korrekt setzen --- diff --git a/SL/Controller/CsvImport/Base.pm b/SL/Controller/CsvImport/Base.pm index 69060262b..66cbfce1c 100644 --- a/SL/Controller/CsvImport/Base.pm +++ b/SL/Controller/CsvImport/Base.pm @@ -54,7 +54,7 @@ sub run { return if ( !$self->csv->header || $self->csv->errors ); - my $headers = { headers => [ map {; $_->{key} } @{ $self->csv->specs->[0] } ] }; + my $headers = { headers => [ grep { $self->csv->dispatcher->is_known($_, 0) } @{ $self->csv->header } ] }; $headers->{methods} = [ map { $_->{path} } @{ $self->csv->specs->[0] } ]; $headers->{used} = { map { ($_ => 1) } @{ $headers->{headers} } }; $self->controller->headers($headers);