page: retrieve static contents from article object
[minimedit.git] / page.php
index 894efc003cc2671014e5115b2012870a4c55da2e..a05e158f198960358599af2001522c2f13cc1fc7 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 ($Article->file) {
+       print $Article->raw;
+       $found = 1;
 }
 
 print "</div>\n\n";