Skip to content

Commit

Permalink
Fix lochmueller#393 - Add location to import command
Browse files Browse the repository at this point in the history
  • Loading branch information
lochmueller committed Jun 4, 2020
1 parent 74d6120 commit c38f182
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Classes/Command/ImportCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ protected function prepareEvents(array $icalEvents)
'uid' => $icalEvent['UID'],
'start' => $startDateTime,
'end' => $endDateTime,
'title' => $icalEvent['SUMMARY'],
'description' => $icalEvent['DESCRIPTION'],
'title' => $icalEvent['SUMMARY'] ? $icalEvent['SUMMARY'] : '',
'description' => $icalEvent['DESCRIPTION'] ? $icalEvent['DESCRIPTION'] : '',
'location' => $icalEvent['LOCATION'] ? $icalEvent['LOCATION'] : '',
];
}

Expand Down
1 change: 1 addition & 0 deletions Classes/Slots/EventImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function importCommand(array $event, $commandController, $pid, $handled)
$eventObject->setPid($pid);
$eventObject->setTitle($event['title']);
$eventObject->setDescription($this->nl2br($event['description']));
$eventObject->setLocation($event['location']);

$configuration = $this->getConfiguration($pid, $event['start'], $event['end']);
$eventObject->addCalendarize($configuration);
Expand Down

0 comments on commit c38f182

Please sign in to comment.