open already existing events and not import them again

This commit is contained in:
Ralf Becker 2011-05-26 18:40:35 +00:00
parent 1267d2ed60
commit 97d920bc57

View File

@ -1108,12 +1108,19 @@ class calendar_uiforms extends calendar_ui
else else
{ {
$event = array_shift($events); $event = array_shift($events);
if (($existing_event = $this->bo->read($event['uid'])))
{
$event = $existing_event;
}
else
{
$event['participant_types'] = array(); $event['participant_types'] = array();
foreach($event['participants'] as $uid => $status) foreach($event['participants'] as $uid => $status)
{ {
calendar_so::split_user($uid, $user_type, $user_id); calendar_so::split_user($uid, $user_type, $user_id);
$event['participant_types'][$user_type][$user_id] = $status; $event['participant_types'][$user_type][$user_id] = $status;
} }
}
//error_log(__METHOD__."(...) parsed as ".array2string($event)); //error_log(__METHOD__."(...) parsed as ".array2string($event));
} }
unset($ical); unset($ical);