From 77e272e8ed6a2a52dd231365637eb847340bbf91 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 8 Jul 2020 20:42:28 +0000 Subject: [PATCH 1/2] Issue 8836: Point the event to the local post --- src/Model/Event.php | 4 +--- view/templates/event.tpl | 2 +- view/theme/frio/templates/event.tpl | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Model/Event.php b/src/Model/Event.php index 145632fdfc..6f8ed123c1 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -617,10 +617,8 @@ class Event } $author_link = $event['author-link']; - $plink = $event['plink']; $event['author-link'] = Contact::magicLink($author_link); - $event['plink'] = Contact::magicLink($author_link, $plink); $html = self::getHTML($event); $event['summary'] = BBCode::convert(Strings::escapeHtml($event['summary'])); @@ -640,7 +638,7 @@ class Event 'is_first' => $is_first, 'item' => $event, 'html' => $html, - 'plink' => [$event['plink'], DI::l10n()->t('link to source'), '', ''], + 'plink' => Item::getPlink($event), ]; } diff --git a/view/templates/event.tpl b/view/templates/event.tpl index f318c909ba..f9f790c858 100644 --- a/view/templates/event.tpl +++ b/view/templates/event.tpl @@ -4,7 +4,7 @@ {{if $event.item.author_name}}{{$event.item.author_name}}{{/if}} {{$event.html nofilter}} - {{if $event.item.plink}}{{/if}} + {{if $event.plink.orig}}{{/if}} {{if $event.edit}}{{/if}} {{if $event.copy}}{{/if}} {{if $event.drop}}{{/if}} diff --git a/view/theme/frio/templates/event.tpl b/view/theme/frio/templates/event.tpl index 9a6f747e57..3af211284a 100644 --- a/view/theme/frio/templates/event.tpl +++ b/view/theme/frio/templates/event.tpl @@ -18,7 +18,7 @@ {{if $event.edit}}{{/if}} {{if $event.copy}}{{/if}} {{if $event.drop}}{{/if}} - {{if $event.item.plink}}{{/if}} + {{if $event.plink.orig}}{{/if}}
From 966738ecc60bfcfde8486ef69228bc7f48724f48 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 8 Jul 2020 20:47:05 +0000 Subject: [PATCH 2/2] Use the "orig_title" --- view/templates/event.tpl | 2 +- view/theme/frio/templates/event.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/view/templates/event.tpl b/view/templates/event.tpl index f9f790c858..62317519b0 100644 --- a/view/templates/event.tpl +++ b/view/templates/event.tpl @@ -4,7 +4,7 @@ {{if $event.item.author_name}}{{$event.item.author_name}}{{/if}} {{$event.html nofilter}} - {{if $event.plink.orig}}{{/if}} + {{if $event.plink.orig}}{{/if}} {{if $event.edit}}{{/if}} {{if $event.copy}}{{/if}} {{if $event.drop}}{{/if}} diff --git a/view/theme/frio/templates/event.tpl b/view/theme/frio/templates/event.tpl index 3af211284a..5dcc7e6f3b 100644 --- a/view/theme/frio/templates/event.tpl +++ b/view/theme/frio/templates/event.tpl @@ -18,7 +18,7 @@ {{if $event.edit}}{{/if}} {{if $event.copy}}{{/if}} {{if $event.drop}}{{/if}} - {{if $event.plink.orig}}{{/if}} + {{if $event.plink.orig}}{{/if}}