From: Bernd Bleßmann Date: Fri, 16 Aug 2013 15:11:59 +0000 (+0200) Subject: Code-Vereinfachung X-Git-Tag: release-3.1.0beta1~22^2~134 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8ad3a60e282dc36dd0738751ff714e1d04abdd8f;p=kivitendo-erp.git Code-Vereinfachung --- diff --git a/SL/Helper/Csv/Dispatcher.pm b/SL/Helper/Csv/Dispatcher.pm index a744892c1..a08a63397 100644 --- a/SL/Helper/Csv/Dispatcher.pm +++ b/SL/Helper/Csv/Dispatcher.pm @@ -106,19 +106,13 @@ sub is_known { sub parse_profile { my ($self, %params) = @_; - my $profile; - my $class; my @specs; + my $csv_profile = $self->_csv->profile; my $i = 0; foreach my $header (@{ $self->_csv->header }) { - if ($self->_csv->profile) { - $profile = $self->_csv->profile->[$i]->{profile}; - $class = $self->_csv->profile->[$i]->{class}; - } - - my $spec = $self->_parse_profile(profile => $profile, - class => $class, + my $spec = $self->_parse_profile(profile => $csv_profile->[$i]->{profile}, + class => $csv_profile->[$i]->{class}, header => $header); push @specs, $spec; $i++;