$courseid = SITEID;
}
if ($mimetype == 'text/html') {
+ $options = new object();
$options->noclean = true;
+ $options->nocache = true; // temporary workaround for MDL-5136
$text = $pathisstring ? $path : implode('', file($path));
$output = format_text($text, FORMAT_HTML, $options, $courseid);
if (!empty($CFG->usesid) && empty($_COOKIE['MoodleSession'.$CFG->sessioncookie])) {
if (!isset($options->noclean)) {
$options->noclean=false;
}
+ if (!isset($options->nocache)) {
+ $options->nocache=false;
+ }
if (!isset($options->smiley)) {
$options->smiley=true;
}
}
}
- if (!empty($CFG->cachetext)) {
+ if (!empty($CFG->cachetext) and empty($options->nocache)) {
$time = time() - $CFG->cachetext;
$md5key = md5($text.'-'.$courseid.$options->noclean.$options->smiley.$options->filter.$options->para.$options->newlines.$format.current_language().$courseid.$options->trusttext);
if ($oldcacheitem = get_record_sql('SELECT * FROM '.$CFG->prefix.'cache_text WHERE md5key = \''.$md5key.'\'', true)) {