handling double-mailing to participants by checking the mailadress list before adding

This commit is contained in:
Klaus Leithoff 2009-03-05 15:18:40 +00:00
parent dd41d422e9
commit 6e0d963eb7

View File

@ -647,6 +647,7 @@ class calendar_uiforms extends calendar_ui
foreach($event['participants'] as $uid => $status)
{
$toadd = '';
if ($status == 'R' || $uid == $this->user) continue;
if (is_numeric($uid) && $GLOBALS['egw']->accounts->get_type($uid) == 'u')
@ -655,7 +656,8 @@ class calendar_uiforms extends calendar_ui
$GLOBALS['egw']->accounts->get_account_name($uid,$lid,$firstname,$lastname);
$to[] = $firstname.' '.$lastname.' <'.$email.'>';
$toadd = $firstname.' '.$lastname.' <'.$email.'>';
if (!in_array($toadd,$to)) $to[] = $toadd;
}
elseif ($uid < 0)
{
@ -665,7 +667,8 @@ class calendar_uiforms extends calendar_ui
$GLOBALS['egw']->accounts->get_account_name($uid,$lid,$firstname,$lastname);
$to[] = $firstname.' '.$lastname.' <'.$email.'>';
$toadd = $firstname.' '.$lastname.' <'.$email.'>';
if (!in_array($toadd,$to)) $to[] = $toadd;
}
}
elseif(($info = $this->bo->resource_info($uid)))