$CFG->currenttextiscacheable
Any filter can set this to FALSE and the current text will not be cached
}
if (empty($courseid)) {
- if (!empty($course->id)) { // An ugly hack for better compatibility
+ if (!empty($course->id)) { // An ugly hack for better compatibility
$courseid = $course->id;
}
}
+ $CFG->currenttextiscacheable = true; // Default status - can be changed by any filter
+
switch ($format) {
case FORMAT_HTML:
replace_smilies($text);
break;
}
- if (!empty($CFG->cachetext)) {
+ if (!empty($CFG->cachetext) and $CFG->currenttextiscacheable) {
$newrecord->md5key = $md5key;
$newrecord->formattedtext = addslashes($text);
$newrecord->timemodified = time();