mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Use user accounts when available over addressbook when expanding mailing lists
This commit is contained in:
parent
d4ce9fce91
commit
b86dfa52bb
@ -390,7 +390,15 @@ class calendar_bo
|
||||
}
|
||||
foreach($lists as &$contact)
|
||||
{
|
||||
$contact = 'c'.$contact['id'];
|
||||
// Check for user account
|
||||
if (($account_id = $GLOBALS['egw']->accounts->name2id($contact['id'],'person_id')))
|
||||
{
|
||||
$contact = ''.$account_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$contact = 'c'.$contact['id'];
|
||||
}
|
||||
if ($ignore_acl || $this->check_perms(ACL::READ|self::ACL_READ_FOR_PARTICIPANTS|($use_freebusy?self::ACL_FREEBUSY:0),0,$contact))
|
||||
{
|
||||
if ($contact && !in_array($contact,$contact_list)) // already added?
|
||||
|
@ -440,7 +440,10 @@ class calendar_uiforms extends calendar_ui
|
||||
{
|
||||
foreach($this->bo->enum_mailing_list($participant) as $contact)
|
||||
{
|
||||
$event['participants'][$contact] = $event['participant_types']['c'][substr($contact,1)] =
|
||||
// Mailing lists can contain users, so allow for that possibility
|
||||
$_type = is_numeric($contact) ? '' : $contact[0];
|
||||
$_uid = is_numeric($contact) ? $contact : substr($contact,1);
|
||||
$event['participants'][$contact] = $event['participant_types'][$_type][$_uid] =
|
||||
calendar_so::combine_status($status,$content['participants']['quantity'],$content['participants']['role']);
|
||||
}
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user