summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-04-06 14:31:07 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-04-06 14:31:07 +0200
commitdda739c0cc3b584d89e0745b2cd9eb9599124d28 (patch)
tree3136ad2a815cff8c1bf5c203936f11598470e250 /apps
parent56ab04f11ea102e8cdc018eb75da2f6feeac8a10 (diff)
parent596a8416c2c36449c7b9842e95ea05720c88fca3 (diff)
downloadnextcloud-server-dda739c0cc3b584d89e0745b2cd9eb9599124d28.tar.gz
nextcloud-server-dda739c0cc3b584d89e0745b2cd9eb9599124d28.zip
Merge pull request #23501 from owncloud/alarms_for_birthdayevents
add VALARM for birthday events
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/caldav/birthdayservice.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dav/lib/caldav/birthdayservice.php b/apps/dav/lib/caldav/birthdayservice.php
index 274341949b3..e03a630fed8 100644
--- a/apps/dav/lib/caldav/birthdayservice.php
+++ b/apps/dav/lib/caldav/birthdayservice.php
@@ -147,6 +147,11 @@ class BirthdayService {
$vEvent->{'RRULE'} = 'FREQ=YEARLY';
$vEvent->{'SUMMARY'} = $title . ' (*' . $date->format('Y') . ')';
$vEvent->{'TRANSP'} = 'TRANSPARENT';
+ $alarm = $vCal->createComponent('VALARM');
+ $alarm->add($vCal->createProperty('TRIGGER', '-PT0M', ['VALUE' => 'DURATION']));
+ $alarm->add($vCal->createProperty('ACTION', 'DISPLAY'));
+ $alarm->add($vCal->createProperty('DESCRIPTION', $vEvent->{'SUMMARY'}));
+ $vEvent->add($alarm);
$vCal->add($vEvent);
return $vCal;
}