page: move showdate() into formatting include
[minimedit.git] / widget / nieuws.php
index 977357e5e572d4afff1d43b863f44caa0837c309..c12efc8db3348b5b262f1c24dfe77357832bc4d5 100644 (file)
@@ -17,7 +17,7 @@ function shownews($input, $limit = 1000)
                print '<div>';
                printf(
                        '<h3><a href="/%s">%s <small class="date">%s</small></a></h3>',
-                       $article->link, $article->title, $article->date
+                       $article->link, $article->title, showdate($article->dateparts)
                );
                print $article->story;
                print '</div>';
@@ -55,7 +55,7 @@ function printtoc($input, $class = FALSE)
 
 $articles = (ltrim($Page->path, '/') ?: 'nieuws');
 if (strpos($articles, '/') === FALSE) {
-       if (@$Place['view'] === 'toc') {
+       if (@$Page->place['view'] === 'toc') {
                print "<div>\n";
                foreach (array_reverse(glob("$articles/2???")) as $page) {
                        $year = basename($page, '.html');
@@ -68,10 +68,11 @@ if (strpos($articles, '/') === FALSE) {
        $articles .= '/????';
 }
 
-if (@$Place['view'] === 'toc') {
+if (@$Page->place['view'] === 'toc') {
        printtoc($articles);
        return;
 }
 ob_start();
-shownews($articles, @$Place['n'] ?: 5);
-print getoutput();
+shownews($articles, @$Page->place['n'] ?: 5);
+$Page->raw = ob_get_clean();
+print $Page->render();