diff --git a/changelog/60_UNRELEASED_2020-xx-xx.md b/changelog/60_UNRELEASED_2020-xx-xx.md index 013b4827..eb788756 100644 --- a/changelog/60_UNRELEASED_2020-xx-xx.md +++ b/changelog/60_UNRELEASED_2020-xx-xx.md @@ -74,6 +74,7 @@ - Fixed that the endpoint `/objects/{entity}/{objectId}` always returned successfully, even when the given object not exists (now returns `404` when the object is not found) (thanks @fipwmaqzufheoxq92ebc) - Fixed that the endpoint `/stock/volatile` didn't include products which expire today (thanks @fipwmaqzufheoxq92ebc) - Fixed that the endpoint `/objects/{entity}` did not include Userfields for Userentities (so the effective endpoint `/objects/userobjects`) +- Endpoint `/calendar/ical`: Fixed that "Track date only"-chores were always set to happen at 12am (are treated as all-day events now) - Fixed (again) that CORS was broken ### General & other improvements/fixes diff --git a/controllers/CalendarApiController.php b/controllers/CalendarApiController.php index f60023d4..e25eb702 100644 --- a/controllers/CalendarApiController.php +++ b/controllers/CalendarApiController.php @@ -22,12 +22,18 @@ class CalendarApiController extends BaseApiController $date->setTime(23, 59, 59); } + $description = ''; + if (isset($event['description'])) + { + $description = $event['description']; + } + $vEvent = new \Eluceo\iCal\Component\Event(); $vEvent->setDtStart($date) ->setDtEnd($date) ->setSummary($event['title']) - ->setDescription($event['description']) - ->setNoTime($event['date_format'] === 'date') + ->setDescription($description) + ->setNoTime($event['date_format'] === 'date' || (isset($event['allDay']) && $event['allDay'])) ->setUseTimezone(true); $vCalendar->addComponent($vEvent);