From: Michael J. Rubinsky Date: Thu, 12 Nov 2009 20:57:11 +0000 (-0500) Subject: Second go at forcing string eventIds so JSON encoding will work X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=61f882fdb0fd0b4a7972781f4a272681266c67d3;p=horde.git Second go at forcing string eventIds so JSON encoding will work consistently across event drivers. --- diff --git a/kronolith/lib/Driver/Ical.php b/kronolith/lib/Driver/Ical.php index 9f8440bb5..19df1e191 100644 --- a/kronolith/lib/Driver/Ical.php +++ b/kronolith/lib/Driver/Ical.php @@ -88,7 +88,8 @@ class Kronolith_Driver_Ical extends Kronolith_Driver $event->status = Kronolith::STATUS_FREE; $event->fromiCalendar($component); $event->remoteCal = $this->_calendar; - $event->eventID = $i; + // Force string so JSON encoding is consistent across drivers. + $event->eventID = 'ical' . $i; /* Catch RECURRENCE-ID attributes which mark single recurrence * instances. */ @@ -139,7 +140,7 @@ class Kronolith_Driver_Ical extends Kronolith_Driver if (!$eventId) { return new Kronolith_Event_Ical($this); } - + $eventId = str_replace('ical', '', $eventId); $iCal = $this->_getRemoteCalendar(); if (is_a($iCal, 'PEAR_Error')) { return $iCal;