X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=htdocs%2Fwiki.php;h=be90e7c45274002e4fb5283cda2dbccb874b6a0e;hb=251b9351fd9dedd7e0772a51537ce64ed9dfa4f7;hp=33cc7179783da66dfb73b380452612ecb21432c4;hpb=52165f0eb1fd65bf2e388fcc037389c29a60a0a2;p=platal.git diff --git a/htdocs/wiki.php b/htdocs/wiki.php index 33cc717..be90e7c 100644 --- a/htdocs/wiki.php +++ b/htdocs/wiki.php @@ -1,6 +1,6 @@ clear_compiled_tpl($wiki_template); + } + + // we leave pmwiki do whatever it wants and store everything + ob_start(); + require_once($globals->spoolroot.'/wiki/pmwiki.php'); + + $wikiAll = ob_get_clean(); + // the pmwiki skin we are using (almost empty) has these keywords: + $i = strpos($wikiAll, ""); + $j = strpos($wikiAll, "", $i); + } + + if (Env::get('action')) { + // clean old tmp files + wiki_clean_tmp(); + $page->assign('xorg_extra_header', substr($wikiAll, 0, $i)); + + // create new tmp files with editing page from wiki engine + $wiki_template = wiki_create_tmp(substr($wikiAll, $j)); + } else { + if (!$tmpfile_exists) { + $f = fopen($wiki_template, 'w'); + fputs($f, substr($wikiAll, $j)); + fclose($f); + } + } +} +$page->changeTpl($wiki_template); + +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(); ?>