Merge branch 'master' of ssh://git.kolab.org/git/roundcube

This commit is contained in:
Aleksander Machniak 2013-05-17 10:47:24 +02:00
commit 96e3b0aa87
2 changed files with 19 additions and 6 deletions

View file

@ -1098,6 +1098,23 @@ class calendar extends rcube_plugin
$event['attachments'][$k]['classname'] = rcube_utils::file2class($attachment['mimetype'], $attachment['name']);
}
// check for organizer in attendees list
$organizer = null;
foreach ((array)$event['attendees'] as $i => $attendee) {
if ($attendee['role'] == 'ORGANIZER') {
$organizer = $attendee;
break;
}
}
if ($organizer === null && !empty($event['organizer'])) {
$organizer = $event['organizer'];
$organizer['role'] = 'ORGANIZER';
if (!is_array($event['attendees']))
$event['attendees'] = array();
array_unshift($event['attendees'], $organizer);
}
// mapping url => vurl because of the fullcalendar client script
$event['vurl'] = $event['url'];
unset($event['url']);

View file

@ -113,6 +113,7 @@ abstract class kolab_format_xcal extends kolab_format
'title' => $this->obj->summary(),
'location' => $this->obj->location(),
'description' => $this->obj->description(),
'url' => $this->obj->url(),
'status' => $status_map[$this->obj->status()],
'sensitivity' => $sensitivity_map[$this->obj->classification()],
'priority' => $this->obj->priority(),
@ -245,12 +246,7 @@ abstract class kolab_format_xcal extends kolab_format
$this->obj->setPriority($object['priority']);
$this->obj->setClassification($this->sensitivity_map[$object['sensitivity']]);
$this->obj->setCategories(self::array2vector($object['categories']));
$vurls = new vectorurl;
foreach ((array)$object['url'] as $url) {
$vurls->push(new Url(strval($url)));
}
$this->obj->setUrls($vurls);
$this->obj->setUrl(strval($object['url']));
// process event attendees
$attendees = new vectorattendee;