mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
* InfoLog/CalDAV: fixed since last package (Horde_Icalendar update) not imported start, due and completed dates
This commit is contained in:
parent
b2d48dcd84
commit
6b0852e90f
@ -624,6 +624,17 @@ class infolog_ical extends infolog_bo
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert date(-array) to timestamp used in InfoLog
|
||||
*
|
||||
* @param int|array $date
|
||||
* @return int
|
||||
*/
|
||||
protected static function date2ts($date)
|
||||
{
|
||||
return is_scalar($date) ? $date : egw_time::to($date, 'ts');
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert VTODO into a eGW infolog entry
|
||||
*
|
||||
@ -720,8 +731,7 @@ class infolog_ical extends infolog_bo
|
||||
}
|
||||
foreach ($component->getAllAttributes() as $attribute)
|
||||
{
|
||||
//$attribute['value'] = trim($attribute['value']);
|
||||
if (!strlen($attribute['value'])) continue;
|
||||
if (!$attribute['value'] && $attribute['value'] !== '0') continue;
|
||||
|
||||
switch ($attribute['name'])
|
||||
{
|
||||
@ -768,15 +778,15 @@ class infolog_ical extends infolog_bo
|
||||
case 'DUE':
|
||||
// even as EGroupware only displays the date, we can still store the full value
|
||||
// unless infolog get's stored, it does NOT truncate the time
|
||||
$taskData['info_enddate'] = $attribute['value'];
|
||||
$taskData['info_enddate'] = self::date2ts($attribute['value']);
|
||||
break;
|
||||
|
||||
case 'COMPLETED':
|
||||
$taskData['info_datecompleted'] = $attribute['value'];
|
||||
$taskData['info_datecompleted'] = self::date2ts($attribute['value']);
|
||||
break;
|
||||
|
||||
case 'DTSTART':
|
||||
$taskData['info_startdate'] = $attribute['value'];
|
||||
$taskData['info_startdate'] = self::date2ts($attribute['value']);
|
||||
break;
|
||||
|
||||
case 'PRIORITY':
|
||||
|
Loading…
Reference in New Issue
Block a user