From 810aa25ebdc1352ed2ca6d059445b978661091ec Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 11 Dec 2007 07:13:08 +0000 Subject: [PATCH] "fixed for bug #1011: Mail all participants -dosen't fill in members of groups" --- calendar/inc/class.uiforms.inc.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/calendar/inc/class.uiforms.inc.php b/calendar/inc/class.uiforms.inc.php index 467bd6d073..161d7a0557 100644 --- a/calendar/inc/class.uiforms.inc.php +++ b/calendar/inc/class.uiforms.inc.php @@ -534,12 +534,24 @@ class uiforms extends uical if (is_numeric($uid) && $GLOBALS['egw']->accounts->get_type($uid) == 'u') { + if (!($email = $GLOBALS['egw']->accounts->id2name($uid,'account_email'))) continue; + $GLOBALS['egw']->accounts->get_account_name($uid,$lid,$firstname,$lastname); - - $to[] = $firstname.' '.$lastname. - ' <'.$GLOBALS['egw']->accounts->id2name($uid,'account_email').'>'; + + $to[] = $firstname.' '.$lastname.' <'.$email.'>'; } - if ($uid{0} == 'c' ) + elseif ($uid < 0) + { + foreach($GLOBALS['egw']->accounts->members($uid,true) as $uid) + { + if (!($email = $GLOBALS['egw']->accounts->id2name($uid,'account_email'))) continue; + + $GLOBALS['egw']->accounts->get_account_name($uid,$lid,$firstname,$lastname); + + $to[] = $firstname.' '.$lastname.' <'.$email.'>'; + } + } + elseif ($uid{0} == 'c' ) { if (!is_object($GLOBALS['egw']->contacts)) {