From: skodak Date: Thu, 27 Mar 2008 08:49:25 +0000 (+0000) Subject: MDL-14060 fixed cm caching in forum cron; merged from MOODLE_19_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9db5d080f4915f673134be435375eb14f721c380;p=moodle.git MDL-14060 fixed cm caching in forum cron; merged from MOODLE_19_STABLE --- diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 045d601c9c..b3872402d4 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -316,6 +316,13 @@ function forum_cron() { $userto->canpost = array(); $userto->tracking = array(); + // reset the caches + foreach ($coursemodules as $forumid=>$unused) { + $coursemodules[$forumid]->cache = new object(); + $coursemodules[$forumid]->cache->caps = array(); + unset($coursemodules[$forumid]->uservisible); + } + foreach ($posts as $pid => $post) { // Set up the environment for the post, discussion, forum, course