Calendar - fix empty history logs after drag and drop

This commit is contained in:
nathangray 2018-11-27 11:01:11 -07:00
parent fd36f854a3
commit ab2b00cd13

View File

@ -154,6 +154,14 @@ class calendar_tracking extends Api\Storage\Tracking
$old['participants'] = array();
$old = array_merge($old, $this->alter_participants($participants));
}
// Make sure dates are timestamps
foreach(array('start','end') as $date)
{
if(is_object($data[$date]) && is_a($data[$date], 'DateTime'))
{
$data[$date] = $data[$date]->format('ts');
}
}
parent::track($data,$old,$user,$deleted, $changed_fields);
}