Report conversion warnings

This commit is contained in:
Nathan Gray 2012-09-20 16:28:42 +00:00
parent 5ef7306342
commit 1610a7523e
2 changed files with 5 additions and 2 deletions

View File

@ -166,7 +166,9 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi
// don't import empty contacts // don't import empty contacts
if( count( array_unique( $record ) ) < 2 ) continue; if( count( array_unique( $record ) ) < 2 ) continue;
importexport_import_csv::convert($record, addressbook_egw_record::$types, 'addressbook', $_lookups, $_definition->plugin_options['convert']); $warning = importexport_import_csv::convert($record, addressbook_egw_record::$types, 'addressbook', $_lookups, $_definition->plugin_options['convert']);
if($warning) $this->warnings[$import_csv->get_current_position()] = $warning;
// Set owner, unless it's supposed to come from CSV file // Set owner, unless it's supposed to come from CSV file
if($_definition->plugin_options['owner_from_csv'] && $record['owner']) { if($_definition->plugin_options['owner_from_csv'] && $record['owner']) {
if(!is_numeric($record['owner'])) { if(!is_numeric($record['owner'])) {

View File

@ -174,7 +174,8 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
// don't import empty records // don't import empty records
if( count( array_unique( $record ) ) < 2 ) continue; if( count( array_unique( $record ) ) < 2 ) continue;
importexport_import_csv::convert($record, timesheet_egw_record::$types, 'timesheet', $lookups); $result = importexport_import_csv::convert($record, timesheet_egw_record::$types, 'timesheet', $lookups);
if($result) $this->warnings[$import_csv->get_current_position()] = $result;
// Automatically handle text categories without explicit translation // Automatically handle text categories without explicit translation
foreach(array('ts_status','cat_id') as $field) { foreach(array('ts_status','cat_id') as $field) {