From 61f882fdb0fd0b4a7972781f4a272681266c67d3 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 12 Nov 2009 15:57:11 -0500 Subject: [PATCH] Second go at forcing string eventIds so JSON encoding will work consistently across event drivers. --- kronolith/lib/Driver/Ical.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.11.0