From 443ae66888282937f04c59f6c73d382f9f421a50 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 12 Nov 2009 15:52:54 -0500 Subject: [PATCH] Revert "Need to consistently key events by string, not by integer, otherwise" This won't work, as we won't have any way to retrieve the event now. *sigh* This reverts commit c30b152c027c0b0727f8a7f43b5d1a2490653e21. --- kronolith/lib/Driver/Ical.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kronolith/lib/Driver/Ical.php b/kronolith/lib/Driver/Ical.php index 0719df3a5..9f8440bb5 100644 --- a/kronolith/lib/Driver/Ical.php +++ b/kronolith/lib/Driver/Ical.php @@ -79,14 +79,16 @@ class Kronolith_Driver_Ical extends Kronolith_Driver $components = $iCal->getComponents(); $events = array(); + $count = count($components); $exceptions = array(); - foreach ($components as $component) { + for ($i = 0; $i < $count; $i++) { + $component = $components[$i]; if ($component->getType() == 'vEvent') { $event = new Kronolith_Event_Ical($this); $event->status = Kronolith::STATUS_FREE; $event->fromiCalendar($component); $event->remoteCal = $this->_calendar; - $event->eventID = hash('md5', uniqid(mt_rand(), true)); + $event->eventID = $i; /* Catch RECURRENCE-ID attributes which mark single recurrence * instances. */ -- 2.11.0