From: skodak Date: Wed, 4 Oct 2006 21:22:57 +0000 (+0000) Subject: fixed nocache option in format_text() X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f47f4659de373f0d7c2516c4a167c3a1be5c0331;p=moodle.git fixed nocache option in format_text() --- diff --git a/lib/weblib.php b/lib/weblib.php index 08330f03fe..6ae913a893 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1365,7 +1365,8 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL break; } - if (!empty($CFG->cachetext) and $CFG->currenttextiscacheable) { + if (empty($options->nocache) and !empty($CFG->cachetext) and $CFG->currenttextiscacheable) { + $newcacheitem = new object(); $newcacheitem->md5key = $md5key; $newcacheitem->formattedtext = addslashes($text); $newcacheitem->timemodified = time();