mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-23 05:41:02 +01:00
Use user accounts when available over addressbook when expanding mailing lists
This commit is contained in:
parent
11ef29c359
commit
4d2fce1d06
@ -395,7 +395,15 @@ class calendar_bo
|
|||||||
}
|
}
|
||||||
foreach($lists as &$contact)
|
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 ($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?
|
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)
|
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']);
|
calendar_so::combine_status($status,$content['participants']['quantity'],$content['participants']['role']);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user