mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-42664 Fix the filter_manager instantiation
For legacy reasons, the $CFG->perfdebug uses values 7 for disabled and 15 for enabled. Because of this typo, Moodle has always created instance of the slower performance_measuring_filter_manager instead of the standard filter_manager, regardless the perfdebug setting.
This commit is contained in:
parent
5386f0bbfe
commit
c928c60718
2 changed files with 16 additions and 1 deletions
|
@ -81,7 +81,7 @@ class filter_manager {
|
|||
public static function instance() {
|
||||
global $CFG;
|
||||
if (is_null(self::$singletoninstance)) {
|
||||
if (!empty($CFG->perfdebug)) {
|
||||
if (!empty($CFG->perfdebug) and $CFG->perfdebug > 7) {
|
||||
self::$singletoninstance = new performance_measuring_filter_manager();
|
||||
} else {
|
||||
self::$singletoninstance = new self();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue