Do not count none egroupware participants in Calendar category report

This commit is contained in:
Hadi Nategh 2016-12-16 11:31:35 +01:00
parent 4f922d1eae
commit 59dbdfba21

View File

@ -91,9 +91,8 @@ class calendar_category_report extends calendar_ui{
{ {
foreach ($event['participants'] as $user_id => $status) foreach ($event['participants'] as $user_id => $status)
{ {
// if the participant has not accepted the event or not a chair // if the participant has not accepted the event, not a chair or not an user then skip.
// skip it. if (!($status == 'A' || $status == 'ACHAIR') || preg_match('/^(.*<)?([a-z0-9_.-]+@[a-z0-9_.-]{5,})>?$/i',$user_id)) continue;
if (!($status == 'A' || $status == 'ACHAIR')) continue;
$categories = explode(',', $event['category']); $categories = explode(',', $event['category']);
if (!in_array($cat_id, $categories)) continue; if (!in_array($cat_id, $categories)) continue;