diff options
author | Mario Vavti <mario@mariovavti.com> | 2019-05-26 18:05:11 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2019-05-26 18:05:11 +0200 |
commit | e466d72058b2543bec69c77d2730828acada38a1 (patch) | |
tree | aeb1a73e02c3d28409e96eb0591a7e28846b5539 /Zotlabs | |
parent | 528b9b6a60d847b0ecb639cb7fb8e01ee79b11d4 (diff) | |
download | volse-hubzilla-e466d72058b2543bec69c77d2730828acada38a1.tar.gz volse-hubzilla-e466d72058b2543bec69c77d2730828acada38a1.tar.bz2 volse-hubzilla-e466d72058b2543bec69c77d2730828acada38a1.zip |
adjust birthday handling according to community decision and slightly change display of allday event items
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Channel_calendar.php | 17 |
2 files changed, 1 insertions, 18 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 9bf987027..976ed22fa 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -2766,7 +2766,7 @@ class Libzot { $profile['description'] = $p[0]['pdesc']; $profile['birthday'] = $p[0]['dob']; - if(($profile['birthday'] != '0000-00-00') && (($bd = z_birthday($p[0]['dob'],$e['channel_timezone'])) !== '')) + if(($profile['birthday'] != '0000-00-00') && (($bd = z_birthday($p[0]['dob'],'UTC')) !== '')) $profile['next_birthday'] = $bd; if($age = age($p[0]['dob'],$e['channel_timezone'],'')) diff --git a/Zotlabs/Module/Channel_calendar.php b/Zotlabs/Module/Channel_calendar.php index 44fe261e8..13f879d84 100644 --- a/Zotlabs/Module/Channel_calendar.php +++ b/Zotlabs/Module/Channel_calendar.php @@ -345,20 +345,11 @@ class Channel_calendar extends \Zotlabs\Web\Controller { if(! $tz) $tz = 'UTC'; - if($rr['etype'] === 'birthday') { - $rr['adjust'] = 1; //intval(feature_enabled(local_channel(), 'smart_birthdays')); - } - $start = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtstart'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtstart'], 'c')); if ($rr['nofinish']){ $end = null; } else { $end = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtend'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtend'], 'c')); - - // give a fake end to birthdays so they get crammed into a - // single day on the calendar - if($rr['etype'] === 'birthday') - $end = null; } $catsenabled = feature_enabled(local_channel(),'categories'); @@ -374,14 +365,6 @@ class Channel_calendar extends \Zotlabs\Web\Controller { } } - //$allDay = false; - - // allDay event rules - //if(!strpos($start, 'T') && !strpos($end, 'T')) - // $allDay = true; - //if(strpos($start, 'T00:00:00') && strpos($end, 'T00:00:00')) - // $allDay = true; - $edit = ((local_channel() && $rr['author_xchan'] == get_observer_hash()) ? array(z_root().'/events/'.$rr['event_hash'].'?expandform=1',t('Edit event'),'','') : false); $drop = array(z_root().'/events/drop/'.$rr['event_hash'],t('Delete event'),'',''); |