X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=htdocs%2Fwiki.php;h=6969be1575618e7f4bbdae09e0038f2ac9927db7;hb=9b071cf2a6a9e069b7a5b1e10a4d977269211129;hp=7958eb04025fc3038e4701b96441156783044efb;hpb=bf98922ce7376cd0bb1384958339c3180079eb70;p=platal.git diff --git a/htdocs/wiki.php b/htdocs/wiki.php index 7958eb0..6969be1 100644 --- a/htdocs/wiki.php +++ b/htdocs/wiki.php @@ -1,6 +1,6 @@ wiki->wikidir) -{ - ob_start(); - require_once($globals->spoolroot.$globals->wiki->wikidir.'/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 - $wikiAll = ob_get_clean(); - $i = strpos($wikiAll, ""); +// 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', Env::has('response') ? AUTH_MDP : AUTH_PUBLIC); - $page->assign('xorg_extra_header', substr($wikiAll, 0, $i)); - - $wikiTxt = substr($wikiAll, $i); - - $page->assign('pmwiki', $wikiTxt); +if ($globals->wiki->wikidir) { + $wikisite = 'xorg'; + require_once("wiki.inc.php"); + $page->changeTpl($wiki_template); } +if (!Env::get('action')) + $page->assign('xorg_extra_header', "\n"); + +wiki_assign_auth(); +$page->addCssLink('css/wiki.css'); + $page->run(); ?>