Calendar: Fix creating links for addressbook contacts

This commit is contained in:
nathan 2023-07-11 15:17:37 -06:00
parent fd79a175ce
commit a57e02c77f

View File

@ -1584,13 +1584,13 @@ class calendar_boupdate extends calendar_bo
}
// create links for new participants from addressbook, if configured
if ($cal_id && $GLOBALS['egw_info']['server']['link_contacts'] && !empty($event['participants']))
if($cal_id && $GLOBALS['egw_info']['server']['link_contacts'] && !empty($save_event['participants']))
{
foreach($event['participants'] as $uid => $status)
foreach($save_event['participants'] as $uid => $status)
{
$user_type = $user_id = null;
calendar_so::split_user($uid, $user_type, $user_id);
if ($user_type == 'c' && (!$old_event || !isset($old_event['participants'][$uid])))
if($user_type == 'c' && (!$old_event || !isset($old_event['participants'][$uid])))
{
Link::link('calendar', $cal_id, 'addressbook', $user_id);
}