X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/93c5256cabd4cabc67f7529872060ffc6aa99d1c..2b63cbb67dfa8b65019433108edb62003a39d447:/nieuws/index.php diff --git a/nieuws/index.php b/nieuws/index.php index 53dff0d..c6234cf 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -2,12 +2,12 @@ $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; + $edit = $User && $User->admin("edit $Page$Args") ? htmlspecialchars(@$_GET['edit']) : NULL; if ($edit) { $Article->title = $edit; } @@ -15,7 +15,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);