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 07:36:24 +01:00
parent 5386f0bbfe
commit c928c60718
2 changed files with 16 additions and 1 deletions

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();