diff --git a/site/controllers/program.php b/site/controllers/program.php index 0fc9eff..51697ed 100644 --- a/site/controllers/program.php +++ b/site/controllers/program.php @@ -1,44 +1,37 @@ = $currentMonthIndex || $monthIndex < 8) { + $month = date('F', strtotime($item['date'])); + $monthInFrench = str_replace($englishMonths, $frenchMonths, $month); + + if (!isset($orderedSessions[$monthInFrench])) { + $orderedSessions[$monthInFrench] = []; + } + + $orderedSessions[$monthInFrench][] = $item; + } } return $orderedSessions; } + function createArraySession($event, $session) { $isMapadoEvent = $event->isMapadoEvent() == 'true'; $arraySession = $session->toArray();