projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changelog: Rechtschreibprüfung im ckeditor
[kivitendo-erp.git]
/
SL
/
Controller
/
CsvImport
/
BaseMulti.pm
diff --git
a/SL/Controller/CsvImport/BaseMulti.pm
b/SL/Controller/CsvImport/BaseMulti.pm
index
d4bb745
..
2632722
100644
(file)
--- a/
SL/Controller/CsvImport/BaseMulti.pm
+++ b/
SL/Controller/CsvImport/BaseMulti.pm
@@
-22,7
+22,7
@@
sub run {
my $profile = $self->profile;
my $profile = $self->profile;
- $self->csv(SL::Helper::Csv->new(file
=>
$self->file->file_name,
+ $self->csv(SL::Helper::Csv->new(file
=> ('SCALAR' eq ref $self->file)? $self->file:
$self->file->file_name,
encoding => $self->controller->profile->get('charset'),
profile => $profile,
ignore_unknown_columns => 1,
encoding => $self->controller->profile->get('charset'),
profile => $profile,
ignore_unknown_columns => 1,
@@
-94,6
+94,17
@@
sub run {
$::myconfig{numberformat} = $old_numberformat;
}
$::myconfig{numberformat} = $old_numberformat;
}
+sub init_manager_class {
+ my ($self) = @_;
+
+ my @manager_classes;
+ foreach my $class (@{ $self->class }) {
+ $class =~ m/^SL::DB::(.+)/;
+ push @manager_classes, "SL::DB::Manager::" . $1;
+ }
+ $self->manager_class(\@manager_classes);
+}
+
sub add_columns {
my ($self, $row_ident, @columns) = @_;
sub add_columns {
my ($self, $row_ident, @columns) = @_;
@@
-159,6
+170,7
@@
sub handle_cvars {
my ($self, $entry, %params) = @_;
return if @{ $entry->{errors} };
my ($self, $entry, %params) = @_;
return if @{ $entry->{errors} };
+ return unless $entry->{object}->can('cvars_by_config');
my %type_to_column = ( text => 'text_value',
textfield => 'text_value',
my %type_to_column = ( text => 'text_value',
textfield => 'text_value',
@@
-172,7
+184,7
@@
sub handle_cvars {
# autovivify all cvars (cvars_by_config will do that for us)
my @cvars;
# autovivify all cvars (cvars_by_config will do that for us)
my @cvars;
- @cvars = @{ $entry->{object}->cvars_by_config }
if $entry->{object}->can('cvars_by_config')
;
+ @cvars = @{ $entry->{object}->cvars_by_config };
foreach my $config (@{ $self->cvar_configs_by->{row_ident}->{$entry->{raw_data}->{datatype}} }) {
next unless exists $entry->{raw_data}->{ "cvar_" . $config->name };
foreach my $config (@{ $self->cvar_configs_by->{row_ident}->{$entry->{raw_data}->{datatype}} }) {
next unless exists $entry->{raw_data}->{ "cvar_" . $config->name };