X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/b3aec6cf1cd18493d44cf68d88c8f55b6a417f9c..6fb9cdf658e15a2f774e0ad61b41fa7d8a9fa88d:/nieuws/index.php diff --git a/nieuws/index.php b/nieuws/index.php index 53dff0d..392a10f 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -2,12 +2,13 @@ $replyform = $Page == 'melding' && !empty($User); @list ($year, $page) = explode('/', trim($Args, '/')); -if ($User and $User->admin('news')) { +if ($User and $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 && $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 and $User->admin("edit $Page$Args")) { $taglist = []; foreach (glob("$Page/.tags/*") as $tagpath) { $tagname = pathinfo($tagpath, PATHINFO_BASENAME);