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