Changeset View
Changeset View
Standalone View
Standalone View
plugins/tasklist/tasklist.php
Show First 20 Lines • Show All 2,068 Lines • ▼ Show 20 Lines | public function mail_import_itip() | ||||
} | } | ||||
// import the (newer) task | // import the (newer) task | ||||
else if ($task['sequence'] >= $existing['sequence'] || $task['changed'] >= $existing['changed']) { | else if ($task['sequence'] >= $existing['sequence'] || $task['changed'] >= $existing['changed']) { | ||||
$task['id'] = $existing['id']; | $task['id'] = $existing['id']; | ||||
$task['list'] = $existing['list']; | $task['list'] = $existing['list']; | ||||
// preserve my participant status for regular updates | // preserve my participant status for regular updates | ||||
if (empty($status)) { | if (empty($status)) { | ||||
$emails = $this->lib->get_user_emails(); | $this->lib->merge_attendees($task, $existing); | ||||
foreach ($task['attendees'] as $i => $attendee) { | |||||
if ($attendee['email'] && in_array(strtolower($attendee['email']), $emails)) { | |||||
foreach ($existing['attendees'] as $j => $_attendee) { | |||||
if ($attendee['email'] == $_attendee['email']) { | |||||
$task['attendees'][$i] = $existing['attendees'][$j]; | |||||
break; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
// set status=CANCELLED on CANCEL messages | // set status=CANCELLED on CANCEL messages | ||||
if ($task['_method'] == 'CANCEL') { | if ($task['_method'] == 'CANCEL') { | ||||
$task['status'] = 'CANCELLED'; | $task['status'] = 'CANCELLED'; | ||||
} | } | ||||
// update attachments list, allow attachments update only on REQUEST (#5342) | // update attachments list, allow attachments update only on REQUEST (#5342) | ||||
▲ Show 20 Lines • Show All 254 Lines • Show Last 20 Lines |