Only include Recurrence.Until in the AS message if the event has it set.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 7 Aug 2010 00:44:59 +0000 (20:44 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 7 Aug 2010 00:44:59 +0000 (20:44 -0400)
The default date with a year of 9999 breaks at least the moto droid client.

framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php

index 4a19cd1..7344e4a 100644 (file)
@@ -391,10 +391,10 @@ class Horde_ActiveSync_Message_Appointment extends Horde_ActiveSync_Message_Base
             $r->interval = $recurrence->recurInterval;
         }
 
-        /* AS messages can only have one or the other, not both */
+        /* AS messages can only have one or the other (or none), not both */
         if ($recurrence->hasRecurCount()) {
             $r->occurrences = $recurrence->getRecurCount();
-        } else {
+        } elseif ($recurrence->hasRecurEnd()) {
             $r->until = $recurrence->getRecurEnd();
         }