CsvImport: CVars case insensitive parsen lassen
authorSven Schöling <s.schoeling@linet-services.de>
Wed, 7 Nov 2012 16:04:35 +0000 (17:04 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Wed, 7 Nov 2012 16:04:35 +0000 (17:04 +0100)
SL/Controller/CsvImport/Base.pm

index f84d54b..656495e 100644 (file)
@@ -29,6 +29,7 @@ sub run {
                                   profile                => $profile,
                                   ignore_unknown_columns => 1,
                                   strict_profile         => 1,
+                                  case_insensitive_header => 1,
                                   map { ( $_ => $self->controller->profile->get($_) ) } qw(sep_char escape_char quote_char),
                                  ));
 
@@ -212,6 +213,12 @@ sub init_profile {
     $profile{$col} = $name;
   }
 
+  if ($self->can('all_cvar_configs')) {
+    for (@{ $self->all_cvar_configs }) {
+      $profile{ 'cvar_' . $_->name } = '';
+    }
+  }
+
   $self->profile(\%profile);
 }