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

)(.*?)(?=

)}', ($edit ?: '\1').' [[1]]', $Article->raw); - if ($User and $User->admin('news')) { + if ($User->admin("edit $Page$Args")) { $taglist = []; foreach (glob("$Page/.tags/*") as $tagpath) { $tagname = pathinfo($tagpath, PATHINFO_BASENAME);