X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/5b94cc8fb8d15c44eb5223f262d091b0fe286944..fc5ac7212dade29d2d12ddad934c1dcfe4653794:/page.php?ds=inline diff --git a/page.php b/page.php index f5e9749..1488f1c 100644 --- a/page.php +++ b/page.php @@ -84,6 +84,10 @@ set_include_path(implode(PATH_SEPARATOR, [ DOCROOT, __DIR__ ])); function fail($error) { http_response_code(500); + if (!isset($Article)) { + $Article = new ArchiveArticle(NULL); + $Article->title = 'Fout'; + } include_once 'page.inc.php'; ob_start(); require_once '500.inc.html'; @@ -163,42 +167,33 @@ elseif ($User and $User->admin("edit $Page$Args")) { $staticpage = (file_exists("$Page/template.inc.html") ? "$Page/template.inc.html" : 'template.inc.html'); } -# load static contents +# prepare page contents require_once('article.inc.php'); $Article = new ArchiveArticle($staticpage); ob_start(); # page body -ob_start(); # inner html -print '