page: ignore output buffer in article render
[minimedit.git] / nieuws / index.php
index 08400153ff15dbaffdf2130d66078b16df0a5971..33b61fb49885f00c56f46de82f2f6d78cd37dde8 100644 (file)
@@ -3,7 +3,7 @@ $replyform = $Page->handler == 'melding' && $User->login;
 @list ($year, $page) = explode('/', trim($Page->path, '/'));
 
 if ($User->admin("edit {$Page->handler}")) {
-       print '<script src="/nieuws/edit.js"></script>'."\n";
+       $Page->raw = '<script src="/nieuws/edit.js"></script>'."\n" . $Page->raw;
 }
 
 if ($page and !is_numeric($page)) {
@@ -13,10 +13,10 @@ if ($page and !is_numeric($page)) {
                $Page->title = $edit;
        }
        if ($Page->dateparts) {
-               $Place[1] = ' <small class="date">'.$Page->date.'</small>';
+               $Page->place[1] = ' <small class="date">'.$Page->date.'</small>';
        }
        else {
-               $Place[1] = '';
+               $Page->place[1] = '';
        }
        print preg_replace('{(?<=<h2>)(.*?)(?=</h2>)}', ($edit ?: '\1').' [[1]]', $Page->raw);
        if ($User->admin("edit {$Page->link}")) {
@@ -41,7 +41,7 @@ if ($page and !is_numeric($page)) {
                }
        }
        if ($replyform) {
-               print placeholder_include('reply');
+               print $Page->widget('reply');
        }
        return;
 }
@@ -67,6 +67,6 @@ if ($year) {
        }
 
        print "<h2>$title</h2>\n\n";
-       print placeholder_include('nieuws', [$match]);
+       print $Page->widget('nieuws', [$match]);
        return;
 }