X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/c0f916285fa69edb97a6c8311f567b90b3959ed3..10c5940d15b49f8656c3c1b384f80f4c619d3d82:/nieuws/index.php diff --git a/nieuws/index.php b/nieuws/index.php index 21ee366..3a50265 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -1,26 +1,21 @@ admin('news')) { print ''."\n"; } if ($page and !is_numeric($page)) { - $edit = !empty($User['admin']) ? htmlspecialchars(@$_GET['edit']) : NULL; - $article = new ArchiveArticle("$Page$Args.html"); - $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 (!empty($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); @@ -42,7 +37,7 @@ if ($page and !is_numeric($page)) { } } if ($replyform) { - print placeholder_include('nieuws/replies'); + print placeholder_include('reply'); } return 1; }