Merge branch 'platal-0.10.0'
[platal.git] / modules / platal / review.inc.php
index 6111253..15d1f83 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -29,11 +29,10 @@ class ReviewPage implements PlWizardPage
 
     public function prepare(PlPage &$page, $id)
     {
-        require_once 'wiki.inc.php';
-        $dom = (@$GLOBALS['IS_XNET_SITE'] ? 'ReviewXnet' : 'Review') . '.' . ucfirst($id);
-        wiki_require_page($dom);
-        $page->assign('cacheExists', wiki_work_dir() . '/cache_' . $dom . '.tpl');
-        $page->assign('article', $dom);
+        $wp = new PlWikiPage((@$GLOBALS['IS_XNET_SITE'] ? 'ReviewXnet' : 'Review') . '.' . ucfirst($id));
+        $wp->buildCache();
+        $page->assign('cacheExists', $wp->cacheFilename());
+        $page->assign('article', $wp->name);
     }
 }