X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/b04f76050d54c67844d5d4026993f6fab0edeae5..a954f506e0bf23798d7fee41a07dcba2c80c915d:/login/index.php diff --git a/login/index.php b/login/index.php index e1f0cae..38b7c23 100644 --- a/login/index.php +++ b/login/index.php @@ -1,4 +1,5 @@ api) return; $message = NULL; if (isset($_POST['mail'])) { @@ -41,22 +42,13 @@ if (!$User or !$User->login) { if (empty($message)) http_response_code(403); $target = ltrim($_REQUEST['goto'], '/'); $target = new ArchiveArticle("$target.html"); - - if ($target and $target->handler == 'melding') { - $caller = $Page; - $Page = $target; - ob_start(); - include "./{$target->handler}/index.php"; - ob_end_clean(); - $Page = $caller; - } + $target->index; # run forbidden handler to determine metadata 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'; @@ -67,9 +59,7 @@ if (!$User or !$User->login) { if (isset($_REQUEST['goto'])) { $target = ltrim($_REQUEST['goto'], '/'); - header("Location: /$target"); - http_response_code(302); - exit; + abort("/$target", 302); } if (isset($Page->raw)) {