diff --git a/kronolith/lib/Api.php b/kronolith/lib/Api.php index 017d9ff4b2d..ac288bdcc7b 100644 --- a/kronolith/lib/Api.php +++ b/kronolith/lib/Api.php @@ -1118,11 +1118,16 @@ public function replace($uid, $content, $contentType, $calendar = null) } } - $event->fromiCalendar($component); - // Ensure we keep the original UID, even when content does not - // contain one and fromiCalendar creates a new one. - $event->uid = $uid; - $event->save(); + try { + $rid = $component->getAttribute('RECURRENCE-ID'); + $this->_addiCalEvent($component, Kronolith::getDriver(null, $calendar), true); + } catch (Horde_Icalendar_Exception $e) { + $event->fromiCalendar($component); + // Ensure we keep the original UID, even when content does not + // contain one and fromiCalendar creates a new one. + $event->uid = $uid; + $event->save(); + } } /**