X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/234326791b1e8177eb475bffc5956d7086cfac4e..088e48c44ae79498f459e79dcf52ff02b2467772:/nieuws/index.php diff --git a/nieuws/index.php b/nieuws/index.php index 23cfe4f..f74c632 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -1,23 +1,22 @@ login; @list ($year, $page) = explode('/', trim($Args, '/')); -if ($User and $User->admin) { +if ($User->admin("edit $Page")) { print ''."\n"; } if ($page and !is_numeric($page)) { - $edit = $User && $User->admin ? htmlspecialchars(@$_GET['edit']) : NULL; - $Place['title'] = $edit ?: $Article->title; - if ($Article->file) { - $Place['description'] = $Article->teaser; + $Article->meta['og:type'] = 'article'; + $edit = $User->admin("edit $Page$Args") ? htmlspecialchars(@$_GET['edit']) : NULL; + if ($edit) { + $Article->title = $edit; } - $Place[1] = ' '.$Article->date.''; - print preg_replace('{(?<=