Changeset View
Changeset View
Standalone View
Standalone View
plugins/libcalendaring/lib/libcalendaring_itip.php
Show First 20 Lines • Show All 213 Lines • ▼ Show 20 Lines | public function compose_itip_message($event, $method, $rsvp = true) | ||||
// constraints for a METHOD:REPLY according to RFC 5546 | // constraints for a METHOD:REPLY according to RFC 5546 | ||||
if ($method == 'REPLY') { | if ($method == 'REPLY') { | ||||
$replying_attendee = null; | $replying_attendee = null; | ||||
$reply_attendees = array(); | $reply_attendees = array(); | ||||
foreach ($event['attendees'] as $attendee) { | foreach ($event['attendees'] as $attendee) { | ||||
if ($attendee['role'] == 'ORGANIZER') { | if ($attendee['role'] == 'ORGANIZER') { | ||||
$reply_attendees[] = $attendee; | $reply_attendees[] = $attendee; | ||||
} | } | ||||
// we accept on behalf of a resource | |||||
else if (strcasecmp($attendee['email'], $event['_resource']) == 0) { | |||||
$replying_attendee = $attendee; | |||||
$replying_attendee['sent-by'] = 'mailto:' . $from_utf; | |||||
} | |||||
else if (strcasecmp($attendee['email'], $from) == 0 || strcasecmp($attendee['email'], $from_utf) == 0) { | else if (strcasecmp($attendee['email'], $from) == 0 || strcasecmp($attendee['email'], $from_utf) == 0) { | ||||
$replying_attendee = $attendee; | $replying_attendee = $attendee; | ||||
if ($attendee['status'] != 'DELEGATED') { | if ($attendee['status'] != 'DELEGATED') { | ||||
unset($replying_attendee['rsvp']); // unset the RSVP attribute | unset($replying_attendee['rsvp']); // unset the RSVP attribute | ||||
} | } | ||||
} | } | ||||
// include attendees relevant for delegation (RFC 5546, Section 4.2.5) | // include attendees relevant for delegation (RFC 5546, Section 4.2.5) | ||||
else if ((!empty($attendee['delegated-to']) && | else if ((!empty($attendee['delegated-to']) && | ||||
▲ Show 20 Lines • Show All 782 Lines • Show Last 20 Lines |