mirror of
https://github.com/friendica/friendica
synced 2025-04-23 08:30:10 +00:00
fix event html construction (fixes #2646)
This commit is contained in:
parent
553428d1b1
commit
dcbf4d6d11
3 changed files with 38 additions and 12 deletions
|
@ -12,7 +12,6 @@ require_once 'include/map.php';
|
|||
require_once 'include/datetime.php';
|
||||
|
||||
function format_event_html($ev, $simple = false) {
|
||||
|
||||
if (! ((is_array($ev)) && count($ev))) {
|
||||
return '';
|
||||
}
|
||||
|
@ -32,7 +31,7 @@ function format_event_html($ev, $simple = false) {
|
|||
if ($simple) {
|
||||
$o = "<h3>" . bbcode($ev['summary']) . "</h3>";
|
||||
|
||||
$o .= "<p>" . bbcode($ev['desc']) . "</p>";
|
||||
$o .= "<div>" . bbcode($ev['desc']) . "</div>";
|
||||
|
||||
$o .= "<h4>" . t('Starts:') . "</h4><p>" . $event_start . "</p>";
|
||||
|
||||
|
@ -49,27 +48,26 @@ function format_event_html($ev, $simple = false) {
|
|||
|
||||
$o = '<div class="vevent">' . "\r\n";
|
||||
|
||||
$o .= '<div class="summary event-summary">' . bbcode($ev['summary']) . '</div>' . "\r\n";
|
||||
|
||||
$o .= '<p class="summary event-summary">' . bbcode($ev['summary']) . '</p>' . "\r\n";
|
||||
|
||||
$o .= '<p class="description event-description">' . bbcode($ev['desc']) . '</p>' . "\r\n";
|
||||
|
||||
$o .= '<p class="event-start">' . t('Starts:') . ' <abbr class="dtstart" title="'
|
||||
$o .= '<div class="event-start"><span class="event-label">' . t('Starts:') . '</span> <span class="dtstart" title="'
|
||||
. datetime_convert('UTC', 'UTC', $ev['start'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' ))
|
||||
. '" >'.$event_start
|
||||
. '</abbr></p>' . "\r\n";
|
||||
. '</span></div>' . "\r\n";
|
||||
|
||||
if (! $ev['nofinish']) {
|
||||
$o .= '<p class="event-end" >' . t('Finishes:') . ' <abbr class="dtend" title="'
|
||||
$o .= '<div class="event-end" ><span class="event-label">' . t('Finishes:') . '</span> <span class="dtend" title="'
|
||||
. datetime_convert('UTC', 'UTC', $ev['finish'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' ))
|
||||
. '" >'.$event_end
|
||||
. '</abbr></p>' . "\r\n";
|
||||
. '</span></div>' . "\r\n";
|
||||
}
|
||||
|
||||
$o .= '<div class="description event-description">' . bbcode($ev['desc']) . '</div>' . "\r\n";
|
||||
|
||||
if (strlen($ev['location'])) {
|
||||
$o .= '<p class="event-location"> ' . t('Location:') . ' <span class="location">'
|
||||
$o .= '<div class="event-location"><span class="event-label">' . t('Location:') . '</span> <span class="location">'
|
||||
. bbcode($ev['location'])
|
||||
. '</span></p>' . "\r\n";
|
||||
. '</span></div>' . "\r\n";
|
||||
|
||||
// Include a map of the location if the [map] BBCode is used.
|
||||
if (strpos($ev['location'], "[map") !== false) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue