clear all wiki cache
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 29 Jun 2006 18:29:44 +0000 (18:29 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 29 Jun 2006 18:29:44 +0000 (18:29 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.10@345 839d8a87-29fc-0310-9880-83ba4fa771e5

htdocs/clear_all_cache.php
include/wiki.inc.php

index c7006ad..a06027b 100644 (file)
  ***************************************************************************/
 
 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']);
 
index 7be6f2c..d0a3d96 100644 (file)
@@ -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) {