Skip to content
Snippets Groups Projects
Commit 38ccf7ff authored by hugome's avatar hugome
Browse files

Fix : Agenda getCalendarEvents hook

Return of getCalendarEvents on agenda page :
The array_merge change key of merged array.
parent 290caba1
Branches
No related tags found
No related merge requests found
...@@ -919,7 +919,14 @@ if (count($listofextcals)) ...@@ -919,7 +919,14 @@ if (count($listofextcals))
// Complete $eventarray with events coming from external module // Complete $eventarray with events coming from external module
$parameters=array(); $object=null; $parameters=array(); $object=null;
$reshook=$hookmanager->executeHooks('getCalendarEvents',$parameters,$object,$action); $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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment