]> git.mjollnir.org Git - moodle.git/commitdiff
fixed nocache option in format_text()
authorskodak <skodak>
Wed, 4 Oct 2006 21:22:57 +0000 (21:22 +0000)
committerskodak <skodak>
Wed, 4 Oct 2006 21:22:57 +0000 (21:22 +0000)
lib/weblib.php

index 08330f03fe40cebd0a23e4cc854d4908cf9cdb2c..6ae913a89320f0f07d4db89747f80611a30e5cf9 100644 (file)
@@ -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();