mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Give a warning if imported type is not valid
This commit is contained in:
parent
b126ccf8c3
commit
a0128663ed
@ -176,6 +176,12 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin {
|
||||
$result = importexport_import_csv::convert($record, infolog_egw_record::$types, 'infolog', $lookups, $_definition->plugin_options['convert']);
|
||||
if($result) $this->warnings[$import_csv->get_current_position()] = $result;
|
||||
|
||||
// Make sure type is valid
|
||||
if(!$record['info_type'] || $record['info_type'] && !$this->boinfolog->enums['type'][$record['info_type']])
|
||||
{
|
||||
$this->warnings[$import_csv->get_current_position()] .= lang('Unknown type: %1', $record['info_type']);
|
||||
}
|
||||
|
||||
// Set default status for type, if not specified
|
||||
if(!$record['info_status'] && $record['info_type'])
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user