MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init

This commit is contained in:
Petr Škoda
2013-08-12 13:01:47 +02:00
parent 50ff861263
commit 96f81ea385
43 changed files with 192 additions and 185 deletions
+1 -4
View File
@@ -189,12 +189,9 @@ class core_component {
protected static function is_developer() {
global $CFG;
// Note we can not rely on $CFG->debug here because DB is not initialised yet.
if (isset($CFG->config_php_settings['debug'])) {
// Standard moodle script.
$debug = (int)$CFG->config_php_settings['debug'];
} else if (isset($CFG->debug)) {
// Usually script with ABORT_AFTER_CONFIG.
$debug = (int)$CFG->debug;
} else {
return false;
}