Skip to content

Commit

Permalink
More EAS 16 exception handling fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Feb 3, 2016
1 parent 4d2ed7d commit 8408bea
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion kronolith/lib/Event.php
Expand Up @@ -1746,7 +1746,19 @@ public function fromASAppointment(Horde_ActiveSync_Message_Appointment $message)
* to delete all existing exceptions and re-create them. The only
* drawback to this is that the UIDs will change. */
$kronolith_driver = $this->getDriver();
$this->recurrence = $rrule;

// EAS 16 doesn't update exception data on edits of the base event
// but still sends the recurrence rule. We need to replace the
// recurrence rule if it changed (and overwrite any exceptions),
// otherwise leave it alone.
if ($message->getProtocolVersion() >= Horde_ActiveSync::VERSION_SIXTEEN) {
if (!empty($this->uid) &&
!empty($this->recurrence) &&
!$this->recurrence->isEqual($rrule)) {
$this->disconnectExceptions(true);
$this->recurrence = $rrule;
}
}

if (!empty($this->uid) &&
$message->getProtocolVersion() < Horde_ActiveSync::VERSION_SIXTEEN) {
Expand Down

0 comments on commit 8408bea

Please sign in to comment.