X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/1150da9a36d521bcff52ff08b784f7a5608aa5fa..68acff62101e1c302e55befa6d526c46f15da464:/nieuws/index.php?ds=sidebyside diff --git a/nieuws/index.php b/nieuws/index.php index 1a52011..61ba993 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -1,49 +1,53 @@ handler == 'melding' && $User->login; +@list ($year, $page) = explode('/', trim($Page->path, '/')); -$replyform = $Page == 'melding' && !empty($User); -@list ($year, $page) = explode('/', trim($Args, '/')); - -if (!empty($User['admin'])) { - print ''."\n"; +if ($User->admin("edit {$Page->handler}")) { + $Page->raw = ''."\n" . $Page->raw; } if ($page and !is_numeric($page)) { - $edit = !empty($User['admin']) ? htmlspecialchars(@$_GET['edit']) : NULL; - $article = new ArchiveArticle("$Page$Args.html"); - $Place[1] = ' '.$article->date.''; - print preg_replace('{(?<=
Tags: %s
\n", - implode("\n\t", $taglist) - ); + if ($taglist) { + printf(' '."\n", + implode("\n\t", $taglist) + ); + } } if ($replyform) { - print placeholder_include('nieuws/replies'); + print $Page->widget('reply'); } - return 1; + return; } if ($year) { - ob_clean(); - $match = $Page; + $match = $Page->handler; $title = "Nieuws"; if (is_numeric($year) and $year > 999) { $match .= "/$year"; @@ -57,12 +61,12 @@ if ($year) { $match .= "/19??"; $title .= " vóór 2000"; } - elseif (file_exists("$Page/.tags/$year")) { + elseif (file_exists("{$Page->handler}/.tags/$year")) { $match .= "/.tags/$year"; $title .= " met $year"; } print "