From 2bed41fd9817049d5f8822e381c4f70cc3bf33c8 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 5 Dec 2020 04:15:09 +0100 Subject: [PATCH] login: preview teaser metadata of goto target Assume the introduction paragraph does not contain restricted contents (also included in public sitemap) and wanted as contents for social media links instead of unrelated login description. --- login/index.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/login/index.php b/login/index.php index e1f0cae..7038dcb 100644 --- a/login/index.php +++ b/login/index.php @@ -43,6 +43,8 @@ if (!$User or !$User->login) { $target = new ArchiveArticle("$target.html"); if ($target and $target->handler == 'melding') { + # run forbidden handler to determine metadata + #TODO: generic solution $caller = $Page; $Page = $target; ob_start(); @@ -54,9 +56,8 @@ if (!$User or !$User->login) { if ($target->title) { $Page->title .= ' voor ' . $target->title; } - if ($target->image) { - $Page->image = $target->image; - } + $Page->image = $target->image; + $Page->teaser = $target->teaser; } ob_start(); require_once 'login/form.inc.php'; -- 2.30.0