nieuws: ignore missing page description in new articles
[minimedit.git] / nieuws.php
1 <?php
2 include_once 'nieuws.inc.php';
3 $articles = (ltrim($Args, '/') ?: 'nieuws');
4 if (strpos($articles, '/') === FALSE) {
5         if (@$Place['view'] === 'toc') {
6                 foreach (array_reverse(glob("$articles/2???")) as $page) {
7                         $year = basename($page, '.html');
8                         printf('<h3><a href="/%s">%s</a></h3>'."\n", $page, $year);
9                         printtoc($page, 'gallery');
10                 }
11                 return;
12         }
13         $articles .= '/????';
14 }
15
16 if (@$Place['view'] === 'toc') {
17         printtoc($articles);
18         return;
19 }
20 ob_start();
21 shownews($articles, @$Place['n'] ?: 5);
22 print getoutput();