<?php
/***************************************************************************
- * Copyright (C) 2003-2004 Polytechnique.org *
+ * Copyright (C) 2003-2006 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-require_once("xorg.inc.php");
-if (Env::has('response'))
- new_skinned_page('wiki.tpl', AUTH_MDP);
-else
- new_skinned_page('wiki.tpl', AUTH_PUBLIC);
+require_once 'xorg.inc.php';
-require_once('pmwiki.php');
-
+// this page is to create a smarty template page from a wiki file
+// the wiki engine used is pmwiki.
+// the templates created are stored in wiki.d/cache_wikiword.tpl
+
+// some page can be seen by everybody (public), but to validate a password
+// if we arrive here before setting new access we need to try an auth
+new_skinned_page('wiki.tpl');
+
+if ($globals->wiki->wikidir) {
+ $wikisite = 'xorg';
+ require_once 'wiki.inc.php';
+ $page->changeTpl($wiki_template);
+}
+
+if (!Env::get('action')) {
+ $page->addJsLink('javascript/wiki.js');
+}
+
+wiki_assign_auth();
$page->addCssLink('css/wiki.css');
-$page->assign('xorg_extra_header', substr($wikiAll, 0, $i));
-$page->assign('menu-pmwiki', $wikiMenu);
-$page->assign('pmwiki', $wikiTxt);
$page->run();
?>