From: rabuzarus <>
Date: Thu, 19 Oct 2017 12:16:39 +0000 (+0200)
Subject: fix #3812 - some brocken parts in the display of events (default template)
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=184bfc722d68ce3d961f4cbde729e2b70cf52f1d;p=friendica.git
fix #3812 - some brocken parts in the display of events (default template)
---
diff --git a/include/event.php b/include/event.php
index 88e559a7f3..229aa8cd46 100644
--- a/include/event.php
+++ b/include/event.php
@@ -959,9 +959,11 @@ function format_event_item($item) {
// Format the event location.
$evloc = event_location2array($item['event-location']);
- $location = array(
- 'name' => prepare_text($evloc['name'])
- );
+ $location = array();
+
+ if (isset($evloc['name'])) {
+ $location['name'] = prepare_text($evloc['name']);
+ }
// Construct the map HTML.
if (isset($evloc['address'])) {
$location['map'] = '
' . generate_named_map($evloc['address']) . '
';
diff --git a/view/templates/event_stream_item.tpl b/view/templates/event_stream_item.tpl
index 16d122167d..15975c5d51 100644
--- a/view/templates/event_stream_item.tpl
+++ b/view/templates/event_stream_item.tpl
@@ -4,23 +4,25 @@
{{$dtstart_label}}
- {{$dtstart_dt}}
+ {{$dtstart_dt}}
{{if $finish}}
- {{$dtstart_label}}
- {{$dtend_dt}}
+ {{$dtend_label}}
+ {{$dtend_dt}}
{{/if}}
+ {{if $description}}
{{$description}}
+ {{/if}}
{{if $location}}
{{$location_label}}
{{if $location.name}}
-
{{$location.name}}
+
{{$location.name}}
{{/if}}
{{if $location.map}}{{$location.map}}{{/if}}
diff --git a/view/theme/frio/templates/event_stream_item.tpl b/view/theme/frio/templates/event_stream_item.tpl
index 79a7739df2..87c2e70cad 100644
--- a/view/theme/frio/templates/event_stream_item.tpl
+++ b/view/theme/frio/templates/event_stream_item.tpl
@@ -2,7 +2,9 @@