From 77b90abd5476c89f0de712efc3e399711a18ae49 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 17 Mar 2017 08:25:27 -0600 Subject: [PATCH] Calendar - Lookup person_id and filter by that, in case account name is different from contact file_as --- .../inc/class.calendar_owner_etemplate_widget.inc.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php index 44b1ef8cc4..a10bd5afb6 100644 --- a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php +++ b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php @@ -184,12 +184,10 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist { case 'c': // Remove contacts matching excluded accounts - foreach($_results as $key => $title) + foreach($remove_contacts as $key => $title) { - if(in_array($title, $remove_contacts) || is_array($title) && in_array($title['label'], $remove_contacts)) - { - unset($_results[$key]); - } + $contact_id = Api\Accounts::id2name($key, 'person_id'); + unset($_results[$contact_id]); } break; case 'l':