]> git.mxchange.org Git - friendica.git/commitdiff
events: use best_link_url() and zrl() for the author_link (author link as magic-link)
authorrabuzarus <>
Sat, 4 Nov 2017 15:38:21 +0000 (16:38 +0100)
committerrabuzarus <>
Sat, 4 Nov 2017 15:38:21 +0000 (16:38 +0100)
include/event.php

index 229aa8cd460f52e9c1373a6518bb248dfbecc661..3270b4b054c8f097efd5bea98f54bae1dbc9b234 100644 (file)
@@ -971,6 +971,14 @@ function format_event_item($item) {
                $location['map'] = '<div class="map">' . generate_map(str_replace('/', ' ', $evloc['coordinates'])) . '</div>';
        }
 
+       // Format the profile link
+       $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,9 +997,9 @@ 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']),
+               '$description'    => prepare_text($item['event-desc']),
                '$location_label' => t('Location:'),
                '$show_map_label' => t('Show map'),
                '$hide_map_label' => t('Hide map'),