Branch 'dev/recurring-invitations' - 2 commits - plugins/calendar plugins/libcalendaring plugins/libkolab

Thomas Brüderli bruederli at kolabsys.com
Wed Feb 18 10:21:20 CET 2015


 plugins/calendar/drivers/kolab/kolab_driver.php |    2 +-
 plugins/libcalendaring/libvcalendar.php         |    6 +++---
 plugins/libkolab/lib/kolab_format_xcal.php      |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 422bb0a298c1867fba7626b953b7f263492a3ab1
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Feb 18 10:21:15 2015 +0100

    Fix RSVP flag in iCal and storage (defaults to false); remove redundant information from ical PRODID

diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php
index 10c2223..07612d5 100644
--- a/plugins/libcalendaring/libvcalendar.php
+++ b/plugins/libcalendaring/libvcalendar.php
@@ -41,7 +41,7 @@ class libvcalendar implements Iterator
 {
     private $timezone;
     private $attach_uri = null;
-    private $prodid = '-//Roundcube//Roundcube libcalendaring//Sabre//Sabre VObject//EN';
+    private $prodid = '-//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');
@@ -64,7 +64,7 @@ class libvcalendar implements Iterator
     function __construct($tz = null)
     {
         $this->timezone = $tz;
-        $this->prodid = '-//Roundcube//Roundcube libcalendaring ' . RCUBE_VERSION . '//Sabre//Sabre VObject ' . VObject\Version::VERSION . '//EN';
+        $this->prodid = '-//Roundcube libcalendaring ' . RCUBE_VERSION . '//Sabre//Sabre VObject ' . VObject\Version::VERSION . '//EN';
     }
 
     /**
@@ -502,7 +502,7 @@ class libvcalendar implements Iterator
 
             case 'ATTENDEE':
             case 'ORGANIZER':
-                $params = array();
+                $params = array('rsvp' => false);
                 foreach ($prop->parameters as $param) {
                     switch ($param->name) {
                         case 'RSVP': $params[$param->name] = strtolower($param->value) == 'true'; break;
diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php
index 3d7bc27..e6507d6 100644
--- a/plugins/libkolab/lib/kolab_format_xcal.php
+++ b/plugins/libkolab/lib/kolab_format_xcal.php
@@ -357,7 +357,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 c7df74d5d0cdf3b292a1034c9a0bb3007e9e0b23
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Feb 18 10:20:00 2015 +0100

    Fix updating attendees (do not accidentally set exceptions to thisandfuture)

diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php
index ff02fbb..f2a9269 100644
--- a/plugins/calendar/drivers/kolab/kolab_driver.php
+++ b/plugins/calendar/drivers/kolab/kolab_driver.php
@@ -642,7 +642,7 @@ class kolab_driver extends calendar_driver
   public function update_attendees(&$event, $attendees)
   {
     // for this-and-future updates, merge the updated attendees onto all exceptions in range
-    if (($event['_savemode'] == 'future' && $event['recurrence_id']) || !empty($event['recurrence'])) {
+    if (($event['_savemode'] == 'future' && $event['recurrence_id']) || (!empty($event['recurrence']) && !$event['recurrence_id'])) {
       if (!($storage = $this->get_calendar($event['calendar'])))
         return false;
 




More information about the commits mailing list