From dcb2ed9fe57d7562633916f98034ade1d0ab0ade Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 13 Jun 2019 00:55:17 +0200 Subject: [PATCH] login: title with value of redirect target Name the requested page before login, so it can be read by external sites such as in Whatsapp or Facebook links. Assume titles do not contain restricted details and may be retrieved freely. --- login/index.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/login/index.php b/login/index.php index 8b4c223..c7d705d 100644 --- a/login/index.php +++ b/login/index.php @@ -39,6 +39,17 @@ if (empty($User)) { ob_clean(); require_once 'login/form.inc.php'; $Place['warn'] = $message; + $Place['title'] = 'Inloggen'; + if (isset($_REQUEST['goto'])) { + require_once 'nieuws.inc.php'; + $target = ltrim($_REQUEST['goto'], '/'); + $target = new ArchiveArticle("$target.html"); + if ($target->file) { + if ($target->title) { + $Place['title'] .= ' voor ' . $target->title; + } + } + } return TRUE; } -- 2.30.0