From c9d64d75f3acab6b44d28cd7bcc6e7e5dd042e77 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 20 May 2019 13:51:53 +0200 Subject: move smart birthday feature to calendar settings and override the adjust flag at display time instead of import --- Zotlabs/Module/Channel_calendar.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Channel_calendar.php b/Zotlabs/Module/Channel_calendar.php index 87bac2762..96d32039e 100644 --- a/Zotlabs/Module/Channel_calendar.php +++ b/Zotlabs/Module/Channel_calendar.php @@ -345,6 +345,9 @@ class Channel_calendar extends \Zotlabs\Web\Controller { if(! $tz) $tz = 'UTC'; + if($rr['etype'] === 'birthday') + $rr['adjust'] = 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; -- cgit v1.2.3