From: Mischa POSLAWSKY Date: Wed, 12 Jun 2019 22:55:17 +0000 (+0200) Subject: login: title with value of redirect target X-Git-Tag: v4.0~30 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/dcb2ed9fe57d7562633916f98034ade1d0ab0ade?hp=20ead233cabc8fefcd86bd99f08dadc261669300 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. --- 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; }