Merge pull request #3868 from rabuzarus/20171104_-_use_best_link_url_for_events

events: use best_link_url() and zrl() for creating the author_link (author link as magic-link)
This commit is contained in:
Michael Vogel 2017-11-04 22:33:13 +01:00 committed by GitHub
commit 57f114d7e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -971,6 +971,14 @@ function format_event_item($item) {
$location['map'] = '<div class="map">' . generate_map(str_replace('/', ' ', $evloc['coordinates'])) . '</div>';
}
// Construct the profile link (magic-auth).
$sp = false;
$profile_link = best_link_url($item, $sp);
if (!$sp) {
$profile_link = zrl($profile_link);
}
$event = replace_macros(get_markup_template('event_stream_item.tpl'), array(
'$id' => $item['event-id'],
'$title' => prepare_text($item['event-summary']),
@ -989,7 +997,7 @@ function format_event_item($item) {
'$end_time' => $end_time,
'$end_short' => $end_short,
'$author_name' => $item['author-name'],
'$author_link' => $item['author-link'],
'$author_link' => $profile_link,
'$author_avatar' => $item['author-avatar'],
'$description' => prepare_text($item['event-desc']),
'$location_label' => t('Location:'),