From f47f4659de373f0d7c2516c4a167c3a1be5c0331 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 4 Oct 2006 21:22:57 +0000 Subject: [PATCH] fixed nocache option in format_text() --- lib/weblib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- 2.39.5