Unverified Commit e37c1286 authored by Frederic Massart's avatar Frederic Massart
Browse files

MDL-57101 filter: Always set-up the page for filters

parent a174f247
......@@ -1599,6 +1599,11 @@ class moodle_page {
$OUTPUT = $this->get_renderer('core', null, $target);
}
if (!during_initial_install()) {
$filtermanager = filter_manager::instance();
$filtermanager->setup_page_for_filters($this, $this->context);
}
$this->_wherethemewasinitialised = debug_backtrace();
}
......
......@@ -451,6 +451,7 @@ class core_coursecatlib_testcase extends advanced_testcase {
try {
// Enable the multilang filter and set it to apply to headings and content.
filter_manager::reset_caches();
filter_set_global_state('multilang', TEXTFILTER_ON);
filter_set_applies_to_strings('multilang', true);
$expected = array($c3, $c4, $c1, $c2);
......
......@@ -892,6 +892,7 @@ EOF;
get_mimetype_description(array('filename' => 'test.frog')));
// Test custom description using multilang filter.
filter_manager::reset_caches();
filter_set_global_state('multilang', TEXTFILTER_ON);
filter_set_applies_to_strings('multilang', true);
core_filetypes::update_type('frog', 'frog', 'application/x-frog', 'document',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment