From: Mischa POSLAWSKY Date: Sat, 5 Dec 2020 03:15:09 +0000 (+0100) Subject: login: preview teaser metadata of goto target X-Git-Tag: v5.0~32 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/2bed41fd9817049d5f8822e381c4f70cc3bf33c8?ds=sidebyside 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. --- 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';