*Calendar: Owner / participant no longer have automatically created account group lists offered in mailing list results

This commit is contained in:
nathangray 2020-09-03 13:26:41 -06:00
parent b3a700d7ee
commit aaada4629d
2 changed files with 11 additions and 4 deletions

View File

@ -350,6 +350,12 @@ class calendar_bo
{
$list = $contacts_obj->read_list((int)$id);
if(!$list && $id < 0)
{
$list = array(
'list_name' => Link::title('api-accounts',$id) ?: Api\Accounts::username($id)
);
}
$data[] = array(
'res_id' => $id,
'rights' => self::ACL_READ_FOR_PARTICIPANTS,

View File

@ -207,12 +207,13 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist
switch ($type)
{
case 'l':
// Include mailing lists
// Include mailing lists, but not account groups
$lists = array_filter(
$contacts_obj->get_lists(Api\Acl::READ),
function($element) use($query) {
return (stripos($element, $query) !== false);
}
function($element, $index) use($query) {
return $index > 0 && (stripos($element, $query) !== false);
},
ARRAY_FILTER_USE_BOTH
);
foreach($lists as $list_id => $list)
{