From 228629f93f07ffcf9af6bb66e4a4ffd9801ed18b Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 16 Feb 2018 09:29:26 -0700 Subject: [PATCH] * Calendar - Filter birthdays by name to remove duplicates caused by account + contact --- calendar/inc/class.calendar_bo.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index d7271a0dad..c9129ee83d 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -1908,7 +1908,12 @@ class calendar_bo { $holidays[$date] = array(); } - $holidays[$date] = array_merge($holidays[$date], $bdays); + foreach($bdays as $birthday) + { + // Skip if name / date are already there - duplicate contacts + if(in_array($birthday['name'], array_column($holidays[$date], 'name'))) continue; + $holidays[$date][] = $birthday; + } } } }