using maximum of cal_modified and cal_user_modified for iCal LAST-MODIFIED too

This commit is contained in:
Ralf Becker 2011-10-23 08:31:44 +00:00
parent 5e132c5a53
commit b599d4a4e2
2 changed files with 10 additions and 1 deletions

View File

@ -848,7 +848,11 @@ class calendar_ical extends calendar_boupdate
{
$attributes['CREATED'] = $event['created'] ? $event['created'] : $event['modified'];
}
if ($event['modified'])
if ($event['max_user_modified'])
{
$attributes['LAST-MODIFIED'] = max($event['modified'], $event['max_user_modified']);
}
elseif ($event['modified'])
{
$attributes['LAST-MODIFIED'] = $event['modified'];
}

View File

@ -241,6 +241,11 @@ class calendar_so
$events[$row['cal_id']]['participants'][$uid] = $status;
$events[$row['cal_id']]['participant_types'][$row['cal_user_type']][$row['cal_user_id']] = $status;
if (($modified = $this->db->from_timestamp($row['cal_user_modified'])) > $events[$row['cal_id']]['max_user_modified'])
{
$events[$row['cal_id']]['max_user_modified'] = $modified;
}
}
// custom fields