X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/b3aec6cf1cd18493d44cf68d88c8f55b6a417f9c..bd940f48a9b1c6fb45aef4860d3f23b8094d5ba4:/nieuws/index.php diff --git a/nieuws/index.php b/nieuws/index.php index 53dff0d..ff433d5 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -1,21 +1,25 @@ 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; } if ($Article->dateparts) { $Place[1] = ' '.$Article->date.''; } + else { + $Place[1] = ''; + } 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);