page: read file during article object initialisation
[minimedit.git] / page.php
index 894efc003cc2671014e5115b2012870a4c55da2e..cdec9a802b1d55c8bbd46dcb78283e647a65125d 100644 (file)
--- a/page.php
+++ b/page.php
@@ -165,13 +165,17 @@ elseif ($User and $User->admin) {
 
 # load static contents
 
+require_once('article.inc.php');
+$Article = new ArchiveArticle($staticpage);
+
 ob_start(); # page body
 ob_start(); # inner html
 print '<div class="static">'."\n\n";
 
 $found = FALSE;
-if (isset($staticpage)) {
-       $found = include "./$staticpage";
+if (isset($Article->raw)) {
+       print $Article->raw;
+       $found = 1;
 }
 
 print "</div>\n\n";