ical: set fairly unique ids

This commit is contained in:
nikolark committed 2018-01-31 23:04:46 +01:00
1 parent f25c81aa33
commit 5407800f25
1 file changed
+3 -2
+3 -2
View File
@@ -58,7 +58,8 @@ function fetch_events($from = '-6 months', $to = '+1 year') {
'end' => $end,
'locations' => [$location],
'summary' => html_entity_decode(get_the_title()),
'description' => html_entity_decode($description)
'description' => html_entity_decode($description),
'uid' => 'dns-event-'.$post->ID,
]);
}
@@ -74,7 +75,7 @@ function add_calendar_events($events, $calendar) {
$calendar_event->setStart($event['start'])
->setSummary($event['summary'])
->setDescription($event['description'])
->setUid('asdf');
->setUid($event['uid']);
try {
$calendar_event->setEnd($event['end']);