* Calendar - Fix bug where account birthdays were not shown if there was a contact with a birthday on the same day

This commit is contained in:
nathangray 2018-01-12 10:50:10 -07:00
parent f402561d7d
commit 7a2f0a8f24

View File

@ -1899,7 +1899,17 @@ class calendar_bo
$contacts = new Api\Contacts();
foreach($contacts->get_addressbooks() as $owner => $name)
{
$holidays += $contacts->read_birthdays($owner, $year);
$birthdays = $contacts->read_birthdays($owner, $year);
// Add them in, being careful not to override any existing
foreach($birthdays as $date => $bdays)
{
if(!array_key_exists($date, $holidays))
{
$holidays[$date] = array();
}
$holidays[$date] = array_merge($holidays[$date], $bdays);
}
}
}