From: x2000habouzit Date: Thu, 29 Jun 2006 18:29:44 +0000 (+0000) Subject: clear all wiki cache X-Git-Tag: xorg/0.9.10~25 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=524e615284b8b11f10efe9bb8c477320a2d3bc93;p=platal.git clear all wiki cache git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.10@345 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/htdocs/clear_all_cache.php b/htdocs/clear_all_cache.php index c7006ad..a06027b 100644 --- a/htdocs/clear_all_cache.php +++ b/htdocs/clear_all_cache.php @@ -20,8 +20,10 @@ ***************************************************************************/ require_once("xorg.inc.php"); +require_once("wiki.inc.php"); new_skinned_page('index.tpl', AUTH_COOKIE); $page->clear_compiled_tpl(); +wiki_clear_all_cache(); redirect(empty($_SERVER['HTTP_REFERER']) ? 'index.php' : $_SERVER['HTTP_REFERER']); diff --git a/include/wiki.inc.php b/include/wiki.inc.php index 7be6f2c..d0a3d96 100644 --- a/include/wiki.inc.php +++ b/include/wiki.inc.php @@ -61,6 +61,11 @@ function wiki_clear_cache($n) { $wikisite = $oldwikisite; } +function wiki_clear_all_cache() +{ + system("rm -f ".wiki_work_dir()."/cache_*"); +} + // editing pages are not static but used templates too, so we used // temp template files containing result from wiki function wiki_create_tmp($content) {