From 06452b0541f232b9f87d972203bc6ef8edbee781 Mon Sep 17 00:00:00 2001 From: zero Date: Sat, 27 Jun 2009 13:51:33 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6677 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/wiki/wiki.model.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/wiki/wiki.model.php b/modules/wiki/wiki.model.php index d630ba4a0..3ba2ed7b9 100644 --- a/modules/wiki/wiki.model.php +++ b/modules/wiki/wiki.model.php @@ -28,8 +28,11 @@ $oModuleModel = &getModel('module'); $mid = Context::get('mid'); + $cache_file = sprintf('%sfiles/cache/wiki/%d.xml', _XE_PATH_,$this->module_srl); - FileHandler::writeFile($cache_file, $this->loadWikiTreeList($this->module_srl)); + if($this->grant->write_document || !file_exists($cache_file)) { + FileHandler::writeFile($cache_file, $this->loadWikiTreeList($this->module_srl)); + } print FileHandler::readFile($cache_file); Context::close();