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:
David Mudrák
2013-11-01 09:19:22 +01:00
parent 67d4599aff
commit 2c6520c719
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -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();