diff --git a/importexport/inc/class.importexport_import_ui.inc.php b/importexport/inc/class.importexport_import_ui.inc.php index e0e40f14b0..f746587dc5 100644 --- a/importexport/inc/class.importexport_import_ui.inc.php +++ b/importexport/inc/class.importexport_import_ui.inc.php @@ -97,6 +97,7 @@ { // Set this so plugin doesn't do any data changes $content['dry-run'] = true; + importexport_helper_functions::$dry_run = true; $this->message .= '' . lang('Import aborted').":
\n"; $definition_obj->plugin_options = (array)$definition_obj->plugin_options + array('dry_run' => true); } @@ -105,6 +106,10 @@ { echo $this->preview($plugin, $file, $definition_obj); } + else + { + importexport_helper_functions::$dry_run = false; + } $count = $plugin->import($file, $definition_obj); } else diff --git a/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php b/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php index b62027a595..8e1f7900b0 100644 --- a/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php +++ b/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php @@ -177,7 +177,7 @@ class importexport_wizard_basic_import_csv $content['field_mapping'][$index] = $best_match; } } - } elseif($content['plugin_options']['csv_fields']) { + } elseif(!$content['csv_fields'] && $content['plugin_options']['csv_fields']) { $content['csv_fields'] = $content['plugin_options']['csv_fields']; } return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'],1);