X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/b3aec6cf1cd18493d44cf68d88c8f55b6a417f9c..2884a2a2fd31342c4c2e37b569b2b89a0949995e:/page.php diff --git a/page.php b/page.php index f02544b..932e729 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'; @@ -175,6 +179,15 @@ $Place = [ ]; if (isset($Article->raw)) { + if ($User and $User->admin("edit $Page$Args")) { + # restore meta tags in static contents for editing + foreach (array_reverse($Article->meta) as $metaprop => $val) { + $Article->raw = sprintf( + ''."\n", + $metaprop, $val + ) . $Article->raw; + } + } $Article->raw = '
'."\n\n".$Article->raw."
\n\n"; }