mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-27 15:53:19 +01:00
Allow auto-map from file to update existing mapping
This commit is contained in:
parent
b1a6dd9732
commit
79db13ec5e
@ -131,8 +131,13 @@ class importexport_wizard_basic_import_csv
|
|||||||
// Try to match automatically
|
// Try to match automatically
|
||||||
$english = array();
|
$english = array();
|
||||||
foreach($content['csv_fields'] as $index => $field) {
|
foreach($content['csv_fields'] as $index => $field) {
|
||||||
|
if($content['field_mapping'][$index]) continue;
|
||||||
|
if($content['plugin_options']['field_mapping'][$index]) {
|
||||||
|
# Copy already set, but allow new file to update
|
||||||
|
$content['field_mapping'][$index] = $content['plugin_options']['field_mapping'][$index];
|
||||||
|
}
|
||||||
foreach($this->mapping_fields as $key => $field_name) {
|
foreach($this->mapping_fields as $key => $field_name) {
|
||||||
if(strcasecmp($field, $field_name) == 0) {
|
if(strcasecmp($field, $field_name) == 0 || strcasecmp($field,$key) == 0) {
|
||||||
$content['field_mapping'][$index] = $key;
|
$content['field_mapping'][$index] = $key;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user