1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

fix some PHP Notices and fix birthday calendar - fix #610

This commit is contained in:
Georg Ehrke 2013-03-06 14:47:26 +01:00
parent 39c5e4700e
commit 0769e833d9

View File

@ -93,6 +93,10 @@ class Hooks{
}
$birthday = $vcard->BDAY;
if ((string)$birthday) {
$title = str_replace('{name}',
$vcard->FN,
App::$l10n->t('{name}\'s Birthday'));
$date = new \DateTime($birthday);
$vevent = VObject\Component::create('VEVENT');
//$vevent->setDateTime('LAST-MODIFIED', new DateTime($vcard->REV));
@ -103,9 +107,7 @@ class Hooks{
$vevent->{'UID'} = substr(md5(rand().time()), 0, 10);
// DESCRIPTION?
$vevent->{'RRULE'} = 'FREQ=YEARLY';
$title = str_replace('{name}',
$vcard->FN,
App::$l10n->t('{name}\'s Birthday'));
$vevent->{'SUMMARY'} = $title;
$parameters['events'][] = array(
'id' => 0,//$card['id'],
'vevent' => $vevent,