X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/234326791b1e8177eb475bffc5956d7086cfac4e..10c5940d15b49f8656c3c1b384f80f4c619d3d82:/nieuws/index.php diff --git a/nieuws/index.php b/nieuws/index.php index 23cfe4f..3a50265 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -2,22 +2,20 @@ $replyform = $Page == 'melding' && !empty($User); @list ($year, $page) = explode('/', trim($Args, '/')); -if ($User and $User->admin) { +if ($User and $User->admin('news')) { 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; + $edit = $User && $User->admin('news') ? htmlspecialchars(@$_GET['edit']) : NULL; + if ($edit) { + $Article->title = $edit; } - $Place[1] = ' '.$Article->date.''; - print preg_replace('{(?<=

)(.*?)(?=

)}', ($edit ?: '\1').' [[1]]', ob_get_clean()); - if ($Article->file and $Article->image) { - $Place['image'] = "/".$Article->thumb('600x'); + if ($Article->dateparts) { + $Place[1] = ' '.$Article->date.''; } - if ($User and $User->admin) { + print preg_replace('{(?<=

)(.*?)(?=

)}', ($edit ?: '\1').' [[1]]', ob_get_clean()); + if ($User and $User->admin('news')) { $taglist = []; foreach (glob("$Page/.tags/*") as $tagpath) { $tagname = pathinfo($tagpath, PATHINFO_BASENAME); @@ -39,7 +37,7 @@ if ($page and !is_numeric($page)) { } } if ($replyform) { - print placeholder_include('nieuws/replies'); + print placeholder_include('reply'); } return 1; }