forked from extern/egroupware
calendar: avoid error during CSV import if start or end dates were not able to be parsed
This commit is contained in:
parent
580ff870e6
commit
543fa93c9b
@ -102,7 +102,7 @@ class calendar_import_csv extends importexport_basic_import_csv {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle errors in length or start/end date
|
// Handle errors in length or start/end date
|
||||||
if($record->start > $record->end)
|
if(is_numeric($record->start) && is_numeric($record->end) && $record->start > $record->end)
|
||||||
{
|
{
|
||||||
$record->end = $record->start + $GLOBALS['egw_info']['user']['preferences']['calendar']['defaultlength'] * 60;
|
$record->end = $record->start + $GLOBALS['egw_info']['user']['preferences']['calendar']['defaultlength'] * 60;
|
||||||
$this->warnings[$import_csv->get_current_position()] = lang('error: starttime has to be before the endtime !!!');
|
$this->warnings[$import_csv->get_current_position()] = lang('error: starttime has to be before the endtime !!!');
|
||||||
|
Loading…
Reference in New Issue
Block a user