X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/c00b91e7b8738a6f6a6c61dddc44b532c0d131d2..df00ab2b9618c2ae1038c643b01b05d443368ee9:/nieuws.php diff --git a/nieuws.php b/nieuws.php index 7127a54..2b0151d 100644 --- a/nieuws.php +++ b/nieuws.php @@ -2,8 +2,21 @@ include_once 'nieuws.inc.php'; $articles = (ltrim($Args, '/') ?: 'nieuws'); if (strpos($articles, '/') === FALSE) { + if (@$Place['view'] === 'toc') { + foreach (array_reverse(glob("$articles/2???")) as $page) { + $year = basename($page, '.html'); + printf('

%s

'."\n", $page, $year); + printtoc($page); + } + return; + } $articles .= '/????'; } + +if (@$Place['view'] === 'toc') { + printtoc($articles); + return; +} ob_start(); shownews($articles, @$Place['n'] ?: 5); print getoutput();