From 86d3adaa5084639a1221fc74ac44d5508add25f4 Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Sat, 4 Nov 2017 16:38:21 +0100
Subject: [PATCH 1/2] events: use best_link_url() and zrl() for the author_link
(author link as magic-link)
---
include/event.php | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/event.php b/include/event.php
index 229aa8cd4..3270b4b05 100644
--- a/include/event.php
+++ b/include/event.php
@@ -971,6 +971,14 @@ function format_event_item($item) {
$location['map'] = '
' . generate_map(str_replace('/', ' ', $evloc['coordinates'])) . '
';
}
+ // 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'),
From 3b4f72da939fa9f5155311799044414220d5d039 Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Sat, 4 Nov 2017 16:41:06 +0100
Subject: [PATCH 2/2] events: better comment description
---
include/event.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/event.php b/include/event.php
index 3270b4b05..b9988badf 100644
--- a/include/event.php
+++ b/include/event.php
@@ -971,7 +971,7 @@ function format_event_item($item) {
$location['map'] = '' . generate_map(str_replace('/', ' ', $evloc['coordinates'])) . '
';
}
- // Format the profile link
+ // Construct the profile link (magic-auth).
$sp = false;
$profile_link = best_link_url($item, $sp);