diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 5366720bfc6d732e16ec5bb958630e4dbd1a15ee..321d15ba4856b6087184b553891b0f6c346b5dd7 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -919,7 +919,14 @@ if (count($listofextcals)) // Complete $eventarray with events coming from external module $parameters=array(); $object=null; $reshook=$hookmanager->executeHooks('getCalendarEvents',$parameters,$object,$action); -if (! empty($hookmanager->resArray['eventarray'])) $eventarray=array_merge($eventarray, $hookmanager->resArray['eventarray']); +if (! empty($hookmanager->resArray['eventarray'])) { + foreach ($hookmanager->resArray['eventarray'] as $keyDate => $events) { + if (!isset($eventarray[$keyDate])) { + $eventarray[$keyDate]=array(); + } + $eventarray[$keyDate]=array_merge($eventarray[$keyDate], $events); + } +}