summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV/BirthdayService.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/CalDAV/BirthdayService.php')
-rw-r--r--apps/dav/lib/CalDAV/BirthdayService.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php
index bf26aec5377..104eec6b496 100644
--- a/apps/dav/lib/CalDAV/BirthdayService.php
+++ b/apps/dav/lib/CalDAV/BirthdayService.php
@@ -1,10 +1,12 @@
<?php
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @copyright Copyright (c) 2016, Georg Ehrke
*
* @author Achim Königs <garfonso@tratschtante.de>
* @author Robin Appelman <robin@icewind.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
+ * @author Georg Ehrke <georg@nextcloud.com>
*
* @license AGPL-3.0
*
@@ -147,6 +149,8 @@ class BirthdayService {
} catch (Exception $e) {
return null;
}
+
+ $summary = $title . ' (' . $summarySymbol . $date->format('Y') . ')';
$vCal = new VCalendar();
$vCal->VERSION = '2.0';
$vEvent = $vCal->createComponent('VEVENT');
@@ -163,7 +167,7 @@ class BirthdayService {
$vEvent->DTEND['VALUE'] = 'DATE';
$vEvent->{'UID'} = $doc->UID;
$vEvent->{'RRULE'} = 'FREQ=YEARLY';
- $vEvent->{'SUMMARY'} = $title . ' (' . $summarySymbol . $date->format('Y') . ')';
+ $vEvent->{'SUMMARY'} = $summary;
$vEvent->{'TRANSP'} = 'TRANSPARENT';
$alarm = $vCal->createComponent('VALARM');
$alarm->add($vCal->createProperty('TRIGGER', '-PT0M', ['VALUE' => 'DURATION']));