Ver código fonte

workaround for non-time entries on ical

CauseFX 3 anos atrás
pai
commit
d516ffb38e
1 arquivos alterados com 2 adições e 3 exclusões
  1. 2 3
      api/homepage/ical.php

+ 2 - 3
api/homepage/ical.php

@@ -286,14 +286,13 @@ trait ICalHomepageItem
 						if ($startDt->format('H') == 0 && $startDt->format('i') == 0) {
 							$startDate = $startDt->format('Y-m-d');
 						}
-
 						$events[] = array(
 							'title' => $eventName,
 							'imagetype' => 'calendar-o text-warning text-custom-calendar ' . $extraClass,
 							'imagetypeFilter' => 'ical',
 							'className' => 'bg-calendar calendar-item bg-custom-calendar',
-							'start' => $startDate,
-							'end' => $endDate,
+							'start' => (strlen(trim($start)) == 8) ? $eventDate['start']->format('Y-m-d') : $startDate,
+							'end' => (strlen(trim($end)) == 8) ? $eventDate['end']->format('Y-m-d') : $endDate,
 							'bgColor' => str_replace('text', 'bg', $extraClass),
 						);
 					}