page: ignore output buffer in article render
[minimedit.git] / widget / nieuws.php
index 977357e5e572d4afff1d43b863f44caa0837c309..9cf427cf23bfad67d8b47d92f09dd97f6e627363 100644 (file)
@@ -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();