Branch 'dev/sabre-vobject3' - 3 commits - plugins/libcalendaring plugins/libkolab
Thomas Brüderli
bruederli at kolabsys.com
Wed Nov 12 19:03:11 CET 2014
plugins/libcalendaring/libvcalendar.php | 18 ++++++++++++++----
plugins/libkolab/lib/kolab_format_xcal.php | 2 +-
plugins/libkolab/lib/kolab_storage.php | 2 ++
3 files changed, 17 insertions(+), 5 deletions(-)
New commits:
commit 963cc3e1f5098490be8cf5f7afea6b8b84358e44
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Nov 12 19:03:06 2014 +0100
Support SCHEDULE-STATUS attende/organizer parameters
diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php
index 4d43248..7c049b3 100644
--- a/plugins/libcalendaring/libvcalendar.php
+++ b/plugins/libcalendaring/libvcalendar.php
@@ -36,8 +36,16 @@ class libvcalendar implements Iterator
private $attach_uri = null;
private $prodid = '-//Roundcube//Roundcube libcalendaring//Sabre//Sabre VObject//EN';
private $type_component_map = array('event' => 'VEVENT', 'task' => 'VTODO');
- private $attendee_keymap = array('name' => 'CN', 'status' => 'PARTSTAT', 'role' => 'ROLE',
- 'cutype' => 'CUTYPE', 'rsvp' => 'RSVP', 'delegated-from' => 'DELEGATED-FROM', 'delegated-to' => 'DELEGATED-TO');
+ private $attendee_keymap = array(
+ 'name' => 'CN',
+ 'status' => 'PARTSTAT',
+ 'role' => 'ROLE',
+ 'cutype' => 'CUTYPE',
+ 'rsvp' => 'RSVP',
+ 'delegated-from' => 'DELEGATED-FROM',
+ 'delegated-to' => 'DELEGATED-TO',
+ 'schedule-status' => 'SCHEDULE-STATUS',
+ );
private $iteratorkey = 0;
private $charset;
private $forward_exceptions;
@@ -1107,12 +1115,14 @@ class libvcalendar implements Iterator
else if (!empty($attendee['email'])) {
if (isset($attendee['rsvp']))
$attendee['rsvp'] = $attendee['rsvp'] ? 'TRUE' : 'FALSE';
- $ve->add('ATTENDEE', 'mailto:' . $attendee['email'], array_filter(self::map_keys($attendee, $this->attendee_keymap)));
+ $ve->add('ATTENDEE', 'mailto:' . $attendee['email'],
+ array_filter(self::map_keys($attendee, $this->attendee_keymap)));
}
}
if ($event['organizer']) {
- $ve->add('ORGANIZER', 'mailto:' . $event['organizer']['email'], self::map_keys($event['organizer'], array('name' => 'CN')));
+ $ve->add('ORGANIZER', 'mailto:' . $event['organizer']['email'],
+ array_filter(self::map_keys($event['organizer'], $this->attendee_keymap)));
}
foreach ((array)$event['url'] as $url) {
commit d055e770abcd5aeab26e5017362745803e711c03
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Nov 12 18:55:04 2014 +0100
Set RSVP=TRUE only on rescheduling
diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php
index ad54505..b9cce9c 100644
--- a/plugins/libkolab/lib/kolab_format_xcal.php
+++ b/plugins/libkolab/lib/kolab_format_xcal.php
@@ -366,7 +366,7 @@ abstract class kolab_format_xcal extends kolab_format
// set attendee RSVP if missing
if (!isset($attendee['rsvp'])) {
- $object['attendees'][$i]['rsvp'] = $attendee['rsvp'] = true;
+ $object['attendees'][$i]['rsvp'] = $attendee['rsvp'] = $reschedule;
}
$att = new Attendee;
commit 1976658f3e0d6a51ea06b35d7f5800aaa12cbd66
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Wed Nov 12 18:53:50 2014 +0100
Initialize class before using self::$config
diff --git a/plugins/libkolab/lib/kolab_storage.php b/plugins/libkolab/lib/kolab_storage.php
index dfd1887..01bbe98 100644
--- a/plugins/libkolab/lib/kolab_storage.php
+++ b/plugins/libkolab/lib/kolab_storage.php
@@ -249,6 +249,8 @@ class kolab_storage
*/
public static function get_freebusy_server()
{
+ self::setup();
+
$url = 'https://' . $_SESSION['imap_host'] . '/freebusy';
$url = self::$config->get('kolab_freebusy_server', $url);
$url = rcube_utils::resolve_url($url);
More information about the commits
mailing list