Export all recurrence exceptions in one property instead of multiple properties....
authorJan Schneider <jan@horde.org>
Wed, 10 Nov 2010 17:10:25 +0000 (18:10 +0100)
committerJan Schneider <jan@horde.org>
Wed, 10 Nov 2010 17:10:47 +0000 (18:10 +0100)
horde/docs/CHANGES
kronolith/docs/CHANGES
kronolith/lib/Event.php
kronolith/lib/tests/toicalendar.phpt

index 79e9248..b849cb1 100644 (file)
@@ -55,6 +55,7 @@ v4.0-cvs
 v3.3.11-cvs
 -----------
 
+[jan] Fix exporting recurrence exceptions to vCalendar 1.0.
 [jan] Skip event status synchronization with Outlook, which is broken.
 [jan] Don't send SIF data to recent Funambol clients, unless requested.
 [jan] Log all queries and errors by the history library.
index 013255c..33a7da3 100644 (file)
@@ -46,7 +46,7 @@ v3.0-git
 v2.3.6-cvs
 ----------
 
-
+[jan] Export recurrence exceptions in a more portable way.
 
 
 ------
index 2710503..447df9a 100644 (file)
@@ -776,13 +776,16 @@ abstract class Kronolith_Event
             }
 
             /* The remaining exceptions represent deleted recurrences */
+            $exdates = array();
             foreach ($exceptions as $exception) {
                 if (!empty($exception)) {
                     list($year, $month, $mday) = sscanf($exception, '%04d%02d%02d');
-                    $exdate = new Horde_Date($year, $month, $mday);
-                    $vEvent->setAttribute('EXDATE', array($exdate));
+                    $exdates[] = new Horde_Date($year, $month, $mday);
                 }
             }
+            if ($exdates) {
+                $vEvent->setAttribute('EXDATE', $exdates);
+            }
         }
         array_unshift($vEvents, $vEvent);
 
index 03d19c3..d676bd5 100644 (file)
@@ -40,6 +40,7 @@ $object->recurrence = new Horde_Date_Recurrence($object->start);
 $object->recurrence->setRecurType(Horde_Date_Recurrence::RECUR_MONTHLY_DATE);
 $object->recurrence->setRecurInterval(1);
 $object->recurrence->addException(2007, 4, 15);
+$object->recurrence->addException(2007, 6, 15);
 $object->attendees =
     array('juergen@example.com' =>
           array('attendance' => Kronolith::PART_REQUIRED,
@@ -139,7 +140,7 @@ ATTENDEE;EXPECT=FYI;STATUS=DECLINED:Jack Doe <jack@example.com>
 ATTENDEE;EXPECT=FYI;STATUS=TENTATIVE:jenny@example.com
 AALARM:20070315T120020Z
 RRULE:MD1 15 #0
-EXDATE:20070415T111020Z
+EXDATE:20070415T111020Z;20070615T111020Z
 END:VEVENT
 END:VCALENDAR
 
@@ -164,7 +165,7 @@ ATTENDEE;ROLE=NON-PARTICIPANT;PARTSTAT=DECLINED;CN=Jack
   Doe:mailto:jack@example.com
 ATTENDEE;ROLE=NON-PARTICIPANT;PARTSTAT=TENTATIVE:mailto:jenny@example.com
 RRULE:FREQ=MONTHLY;INTERVAL=1
-EXDATE:20070415T111020Z
+EXDATE:20070415T111020Z,20070615T111020Z
 BEGIN:VALARM
 ACTION:DISPLAY
 TRIGGER;VALUE=DURATION:-PT10M