Revision 141b5c0a
Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt
SL/Controller/CsvImport/Base.pm | ||
---|---|---|
311 | 311 |
|
312 | 312 |
# merge existing with new cvars. swap every existing with the imported one, push the rest |
313 | 313 |
if (@cvars) { |
314 |
my @orig_cvars = ($entry->{object_to_save} || $entry->{object})->custom_variables; |
|
314 |
my $object = $entry->{object_to_save} || $entry->{object}; |
|
315 |
my @orig_cvars = $object->custom_variables; |
|
315 | 316 |
for (@orig_cvars) { |
316 | 317 |
$_ = $changed_cvars{ $_->config->name } if $changed_cvars{ $_->config->name }; |
317 | 318 |
delete $changed_cvars{ $_->config->name }; |
318 | 319 |
} |
319 | 320 |
push @orig_cvars, values %changed_cvars; |
320 | 321 |
|
321 |
$entry->{object}->custom_variables(\@orig_cvars);
|
|
322 |
$object->custom_variables(\@orig_cvars);
|
|
322 | 323 |
} |
323 | 324 |
} |
324 | 325 |
|
Auch abrufbar als: Unified diff
CsvImport: handle_cvars: CVars für das zu speichernde Objekt setzen.