From 59dbdfba213a003bc78e45d3c7f50b2288426982 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 16 Dec 2016 11:31:35 +0100 Subject: [PATCH] Do not count none egroupware participants in Calendar category report --- calendar/inc/class.calendar_category_report.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_category_report.inc.php b/calendar/inc/class.calendar_category_report.inc.php index 27e8bf1eb2..ae0e167573 100644 --- a/calendar/inc/class.calendar_category_report.inc.php +++ b/calendar/inc/class.calendar_category_report.inc.php @@ -91,9 +91,8 @@ class calendar_category_report extends calendar_ui{ { foreach ($event['participants'] as $user_id => $status) { - // if the participant has not accepted the event or not a chair - // skip it. - if (!($status == 'A' || $status == 'ACHAIR')) continue; + // if the participant has not accepted the event, not a chair or not an user then skip. + if (!($status == 'A' || $status == 'ACHAIR') || preg_match('/^(.*<)?([a-z0-9_.-]+@[a-z0-9_.-]{5,})>?$/i',$user_id)) continue; $categories = explode(',', $event['category']); if (!in_array($cat_id, $categories)) continue;