Multi-lang filter can flag a text as not being cacheable
This commit is contained in:
@@ -48,6 +48,8 @@ if (function_exists($textfilter_function)) {
|
||||
|
||||
function multilang_filter($courseid, $text) {
|
||||
|
||||
global $CFG;
|
||||
|
||||
/// Make sure XML is enabled in this PHP
|
||||
if (!function_exists('xml_parser_create')) {
|
||||
return $text;
|
||||
@@ -58,6 +60,9 @@ function multilang_filter($courseid, $text) {
|
||||
return $text;
|
||||
}
|
||||
|
||||
/// Flag this text as something not to cache
|
||||
$CFG->currenttextiscacheable = false;
|
||||
|
||||
/// Get current language
|
||||
$currentlanguage = current_language();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user