X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fevents.php;h=695432e2a4b89db8f955bcd5477dc97b82369da5;hb=bd89b8262f11b24b90c156359759f185b3844d68;hp=69f6b6f326853cf2923379c94d982ce50008d57d;hpb=5e0b4b8a8f39f28fcfc2812e66223d95c92431a0;p=friendica.git diff --git a/mod/events.php b/mod/events.php index 69f6b6f326..695432e2a4 100644 --- a/mod/events.php +++ b/mod/events.php @@ -256,6 +256,11 @@ function events_content(App $a) // get the translation strings for the callendar $i18n = Event::getStrings(); + DI::page()->registerStylesheet('view/asset/fullcalendar/dist/fullcalendar.min.css'); + DI::page()->registerStylesheet('view/asset/fullcalendar/dist/fullcalendar.print.min.css', 'print'); + DI::page()->registerFooterScript('view/asset/moment/min/moment-with-locales.min.js'); + DI::page()->registerFooterScript('view/asset/fullcalendar/dist/fullcalendar.min.js'); + $htpl = Renderer::getMarkupTemplate('event_head.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($htpl, [ '$module_url' => '/events', @@ -469,16 +474,16 @@ function events_content(App $a) $t_orig = $orig_event['summary'] ?? ''; $d_orig = $orig_event['desc'] ?? ''; $l_orig = $orig_event['location'] ?? ''; - $eid = !empty($orig_event) ? $orig_event['id'] : 0; - $cid = !empty($orig_event) ? $orig_event['cid'] : 0; - $uri = !empty($orig_event) ? $orig_event['uri'] : ''; + $eid = $orig_event['id'] ?? 0; + $cid = $orig_event['cid'] ?? 0; + $uri = $orig_event['uri'] ?? ''; if ($cid || $mode === 'edit') { $share_disabled = 'disabled="disabled"'; } - $sdt = !empty($orig_event) ? $orig_event['start'] : 'now'; - $fdt = !empty($orig_event) ? $orig_event['finish'] : 'now'; + $sdt = $orig_event['start'] ?? 'now'; + $fdt = $orig_event['finish'] ?? 'now'; $tz = date_default_timezone_get(); if (!empty($orig_event)) {