mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Report conversion warnings
This commit is contained in:
parent
5ef7306342
commit
1610a7523e
@ -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'])) {
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user