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:
parent
39c5e4700e
commit
0769e833d9
@ -93,6 +93,10 @@ class Hooks{
|
|||||||
}
|
}
|
||||||
$birthday = $vcard->BDAY;
|
$birthday = $vcard->BDAY;
|
||||||
if ((string)$birthday) {
|
if ((string)$birthday) {
|
||||||
|
$title = str_replace('{name}',
|
||||||
|
$vcard->FN,
|
||||||
|
App::$l10n->t('{name}\'s Birthday'));
|
||||||
|
|
||||||
$date = new \DateTime($birthday);
|
$date = new \DateTime($birthday);
|
||||||
$vevent = VObject\Component::create('VEVENT');
|
$vevent = VObject\Component::create('VEVENT');
|
||||||
//$vevent->setDateTime('LAST-MODIFIED', new DateTime($vcard->REV));
|
//$vevent->setDateTime('LAST-MODIFIED', new DateTime($vcard->REV));
|
||||||
@ -103,9 +107,7 @@ class Hooks{
|
|||||||
$vevent->{'UID'} = substr(md5(rand().time()), 0, 10);
|
$vevent->{'UID'} = substr(md5(rand().time()), 0, 10);
|
||||||
// DESCRIPTION?
|
// DESCRIPTION?
|
||||||
$vevent->{'RRULE'} = 'FREQ=YEARLY';
|
$vevent->{'RRULE'} = 'FREQ=YEARLY';
|
||||||
$title = str_replace('{name}',
|
$vevent->{'SUMMARY'} = $title;
|
||||||
$vcard->FN,
|
|
||||||
App::$l10n->t('{name}\'s Birthday'));
|
|
||||||
$parameters['events'][] = array(
|
$parameters['events'][] = array(
|
||||||
'id' => 0,//$card['id'],
|
'id' => 0,//$card['id'],
|
||||||
'vevent' => $vevent,
|
'vevent' => $vevent,
|
||||||
|
Loading…
Reference in New Issue
Block a user