From 0769e833d9008f23ff34c895fc70c031592481b6 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Wed, 6 Mar 2013 14:47:26 +0100 Subject: [PATCH] fix some PHP Notices and fix birthday calendar - fix #610 --- lib/hooks.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/hooks.php b/lib/hooks.php index b9ba97bf..184474c7 100644 --- a/lib/hooks.php +++ b/lib/hooks.php @@ -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,