From c0a7dfe2f6554fc66e753c456551dd580c479820 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 25 Jan 2024 10:13:10 +0000 Subject: refactor fetch_and_store_parents() and inroduce the fetchparents daemon --- include/bbcode.php | 4 ++++ include/event.php | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index e0a0fe9a1..fb10ceb4a 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1097,6 +1097,10 @@ function parseIdentityAwareHTML($Text) { function bbcode($Text, $options = []) { + if (!$Text) { + return EMPTY_STR; + } + if(! is_array($options)) { $options = []; } diff --git a/include/event.php b/include/event.php index 745469064..da504c2d7 100644 --- a/include/event.php +++ b/include/event.php @@ -58,7 +58,9 @@ function format_event_html($ev) { $ev['dtend'] , $bd_format ))) . '' . "\r\n"; - $o .= '
' . zidify_links(smilies(bbcode($ev['description']))) . '
' . "\r\n"; + if (!empty($ev['description'])) { + $o .= '
' . zidify_links(smilies(bbcode($ev['description']))) . '
' . "\r\n"; + } if(isset($ev['location']) && $ev['location']) $o .= '
' . t('Location:') . ' ' @@ -117,6 +119,7 @@ function format_event_obj($jobject) { $dtdiff = $dtstart->diff($dtend_obj); + $oneday = false; if($allday && ($dtdiff->days < 2)) $oneday = true; -- cgit v1.2.3