summaryrefslogtreecommitdiffstats
path: root/apps/contacts
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-06-29 15:40:46 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-06-29 15:43:18 +0200
commitbda0026374381d4519f1032c365db0a18989fbb7 (patch)
tree1f3202270cb0824f36363e47286ca0a758262436 /apps/contacts
parentb95996c02c8b94a69eba21e31e0c5a3d30756d6d (diff)
downloadnextcloud-server-bda0026374381d4519f1032c365db0a18989fbb7.tar.gz
nextcloud-server-bda0026374381d4519f1032c365db0a18989fbb7.zip
fix birthday calendar
Diffstat (limited to 'apps/contacts')
-rw-r--r--apps/contacts/lib/hooks.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/contacts/lib/hooks.php b/apps/contacts/lib/hooks.php
index 9794a9c9b94..d91d3c565b5 100644
--- a/apps/contacts/lib/hooks.php
+++ b/apps/contacts/lib/hooks.php
@@ -90,9 +90,10 @@ class OC_Contacts_Hooks{
if ($birthday) {
$date = new DateTime($birthday);
$vevent = new OC_VObject('VEVENT');
- $vevent->setDateTime('LAST-MODIFIED', new DateTime($vcard->REV));
+ //$vevent->setDateTime('LAST-MODIFIED', new DateTime($vcard->REV));
$vevent->setDateTime('DTSTART', $date, Sabre_VObject_Element_DateTime::DATE);
$vevent->setString('DURATION', 'P1D');
+ $vevent->setString('UID', substr(md5(rand().time()),0,10));
// DESCRIPTION?
$vevent->setString('RRULE', 'FREQ=YEARLY');
$title = str_replace('{name}', $vcard->getAsString('FN'), OC_Contacts_App::$l10n->t('{name}\'s Birthday'));
@@ -101,6 +102,7 @@ class OC_Contacts_Hooks{
'vevent' => $vevent,
'repeating' => true,
'summary' => $title,
+ 'calendardata' => "BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:ownCloud Contacts " . OCP\App::getAppVersion('contacts') . "\n" . $vevent->serialize() . "END:VCALENDAR"
);
}
}