From: x2001corpet Date: Sat, 16 Sep 2006 00:15:39 +0000 (+0000) Subject: fix charte manquante lors de l'inscription a cause du cache wiki X-Git-Tag: xorg/0.9.11~80 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ab694f121697458dba7599694721f57fb9428184;p=platal.git fix charte manquante lors de l'inscription a cause du cache wiki git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@839 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/include/wiki.inc.php b/include/wiki.inc.php index 861340e..7e28f60 100644 --- a/include/wiki.inc.php +++ b/include/wiki.inc.php @@ -129,4 +129,13 @@ function wiki_apply_perms($perm) { } } +function wiki_require_page($pagename) +{ + global $globals; + $pagename_slashes = str_replace('.','/',$pagename); + $pagename_dots = str_replace('/','.',$pagename); + if (is_file(wiki_work_dir().'/cache_'.$pagename_dots.'.tpl')) return; + system('wget '.$globals->baseurl.'/'.$pagename_slashes.' -O /dev/null'); +} + ?> diff --git a/modules/register.php b/modules/register.php index 613c1ce..615faea 100644 --- a/modules/register.php +++ b/modules/register.php @@ -70,6 +70,8 @@ class RegisterModule extends PLModule switch ($sub_state['step']) { case 0: + require_once('wiki.inc.php'); + wiki_require_page('Docs.Charte'); if (Post::has('step1')) { $sub_state['step'] = 1; if (isset($sub_state['hash'])) { diff --git a/templates/register/step0.tpl b/templates/register/step0.tpl index 0c5740a..ffd9536 100644 --- a/templates/register/step0.tpl +++ b/templates/register/step0.tpl @@ -36,7 +36,7 @@ L'enregistrement se d -{include file=../spool/wiki.d/cache_xorg_Docs.Charte.tpl public=1} +{include file=../spool/wiki.d/cache_Docs.Charte.tpl public=1}