Dont nest the events.

This commit is contained in:
Tim Schumacher 2016-06-05 17:59:56 +02:00
parent b3a4836a10
commit 8bccaab4a2

View file

@ -140,21 +140,19 @@ class Event extends BaseEntity
} }
$event = [ $event = [
"VEVENT" => [ 'SUMMARY' => $this->summary,
'SUMMARY' => $this->summary, 'DTSTART' => $this->startdate,
'DTSTART' => $this->startdate, 'DESCRIPTION' => $this->description,
'DESCRIPTION' => $this->description, 'URL' => $this->url,
'URL' => $this->url, 'CATEGORIES' => $categories,
'CATEGORIES' => $categories,
]
]; ];
if (!is_null($this->enddate)) if (!is_null($this->enddate))
$event["VEVENT"]["DTEND"] = $this->enddate; $event["DTEND"] = $this->enddate;
if ($this->location instanceof Location) { if ($this->location instanceof Location) {
$event["VEVENT"]["LOCATION"] = $this->location->name; $event["LOCATION"] = $this->location->name;
if (\is_float($this->location->lon) && \is_float($this->location->lat)) { if (\is_float($this->location->lon) && \is_float($this->location->lat)) {
$event["VEVENT"]["GEO"] = [$this->location->lat, $this->location->lon]; $event["GEO"] = [$this->location->lat, $this->location->lon];
} }
} }