From 8c84f902c9fbd73554b80b4b6024aa81d1d4d297 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 19 Aug 2013 11:30:45 +0200 Subject: [PATCH] Der Worker bestimmt, ob die Daten multiplex sind oder nicht. Deshalb muss das nicht ermittelt werden. --- SL/Controller/CsvImport/Base.pm | 12 ++---------- SL/Controller/CsvImport/BaseMulti.pm | 2 ++ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/SL/Controller/CsvImport/Base.pm b/SL/Controller/CsvImport/Base.pm index 09a488617..de12c1552 100644 --- a/SL/Controller/CsvImport/Base.pm +++ b/SL/Controller/CsvImport/Base.pm @@ -18,7 +18,7 @@ use parent qw(Rose::Object); use Rose::Object::MakeMethods::Generic ( scalar => [ qw(controller file csv test_run save_with_cascade) ], - 'scalar --get_set_init' => [ qw(is_multiplexed profile displayable_columns existing_objects class manager_class cvar_columns all_cvar_configs all_languages payment_terms_by all_currencies default_currency_id all_vc vc_by) ], + 'scalar --get_set_init' => [ qw(profile displayable_columns existing_objects class manager_class cvar_columns all_cvar_configs all_languages payment_terms_by all_currencies default_currency_id all_vc vc_by) ], ); sub run { @@ -47,10 +47,6 @@ sub run { $self->controller->track_progress(progress => 50); - if ($self->csv->is_multiplexed) { - die "controller for multiplex data is not implemented yet"; - } - $self->controller->errors([ $self->csv->errors ]) if $self->csv->errors; return if ( !$self->csv->header || $self->csv->errors ); @@ -311,11 +307,7 @@ sub init_manager_class { $self->manager_class("SL::DB::Manager::" . $1); } -sub init_is_multiplexed { - my ($self) = @_; - - $self->is_multiplexed('ARRAY' eq ref ($self->class) && scalar @{ $self->class } > 1); -} +sub is_multiplexed { 0 } sub check_objects { } diff --git a/SL/Controller/CsvImport/BaseMulti.pm b/SL/Controller/CsvImport/BaseMulti.pm index c958cb90a..fb2437a05 100644 --- a/SL/Controller/CsvImport/BaseMulti.pm +++ b/SL/Controller/CsvImport/BaseMulti.pm @@ -227,5 +227,7 @@ sub init_manager_class { $self->manager_class("SL::DB::Manager::" . $1); } +sub is_multiplexed { 1 } + 1; -- 2.20.1