From 7ee1f4a619d4336c2b3749ed45b4de356f4c92b5 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 22 Jun 2010 01:01:36 -0400 Subject: [PATCH] Recurrence messages can only contain a recur_end OR a recur_count, not both. --- .../ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php b/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php index c8ac8d282..94278f45c 100644 --- a/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php @@ -389,8 +389,13 @@ class Horde_ActiveSync_Message_Appointment extends Horde_ActiveSync_Message_Base if (!empty($recurrence->recurInterval)) { $r->interval = $recurrence->recurInterval; } - $r->until = $recurrence->getRecurEnd(); - $r->occurrences = $recurrence->getRecurCount(); + + /* AS messages can only have one or the other, not both */ + if ($recurrence->hasRecurCount()) { + $r->occurrences = $recurrence->getRecurCount(); + } else { + $r->until = $recurrence->getRecurEnd(); + } $this->_properties['recurrence'] = $r; } -- 2.11.0