diff options
author | Thomas Bruederli <bruederli@kolabsys.com> | 2013-05-16 07:23:48 (GMT) |
---|---|---|
committer | Aleksander Machniak <machniak@kolabsys.com> | 2013-06-21 10:05:46 (GMT) |
commit | 9fe8791236a5f23c27b015d82a6b7b3c806a550c (patch) | |
tree | 47271cf6836967147c7f8f243ce62203ff3d950f /plugins | |
parent | d34b1b769e88ea1ca367b31ffc743e84abddbdf1 (diff) | |
download | roundcubemail-plugins-kolab-9fe8791236a5f23c27b015d82a6b7b3c806a550c.tar.gz |
Add support for CUTYPE parameter for event attendees
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/libkolab/lib/kolab_format_xcal.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php index b37b727..f173a2e 100644 --- a/plugins/libkolab/lib/kolab_format_xcal.php +++ b/plugins/libkolab/lib/kolab_format_xcal.php @@ -43,6 +43,14 @@ abstract class kolab_format_xcal extends kolab_format 'CHAIR' => kolabformat::Chair, ); + protected $cutype_map = array( + 'INDIVIDUAL' => kolabformat::CutypeIndividual, + 'GROUP' => kolabformat::CutypeGroup, + 'ROOM' => kolabformat::CutypeRoom, + 'RESOURCE' => kolabformat::CutypeResource, + 'UNKNOWN' => kolabformat::CutypeUnknown, + ); + protected $rrule_type_map = array( 'MINUTELY' => RecurrenceRule::Minutely, 'HOURLY' => RecurrenceRule::Hourly, @@ -119,6 +127,7 @@ abstract class kolab_format_xcal extends kolab_format } $role_map = array_flip($this->role_map); + $cutype_map = array_flip($this->cutype_map); $part_status_map = array_flip($this->part_status_map); $attvec = $this->obj->attendees(); for ($i=0; $i < $attvec->size(); $i++) { @@ -127,6 +136,7 @@ abstract class kolab_format_xcal extends kolab_format if ($cr->email() != $object['organizer']['email']) { $object['attendees'][] = array( 'role' => $role_map[$attendee->role()], + 'cutype' => $cutype_map[$attendee->cutype()], 'status' => $part_status_map[$attendee->partStat()], 'rsvp' => $attendee->rsvp(), 'email' => $cr->email(), @@ -248,6 +258,7 @@ abstract class kolab_format_xcal extends kolab_format $att->setContact($cr); $att->setPartStat($this->part_status_map[$attendee['status']]); $att->setRole($this->role_map[$attendee['role']] ? $this->role_map[$attendee['role']] : kolabformat::Required); + $att->setCutype($this->cutype_map[$attendee['cutype']] ? $this->cutype_map[$attendee['cutype']] : kolabformat::CutypeIndividual); $att->setRSVP((bool)$attendee['rsvp']); if ($att->isValid()) { |