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
+4 -2
View File
@@ -61,7 +61,7 @@ function pear_handle_error($error){
print_object($error->backtrace);
}
if (!empty($CFG->debug) and ($CFG->debug >= DEBUG_ALL or $CFG->debug == -1)){
if ($CFG->debugdeveloper) {
//TODO: this is a wrong place to init PEAR!
$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_CALLBACK;
$GLOBALS['_PEAR_default_error_options'] = 'pear_handle_error';
@@ -1261,7 +1261,9 @@ abstract class moodleform {
* @return void
*/
private function detectMissingSetType() {
if (!debugging('', DEBUG_DEVELOPER)) {
global $CFG;
if (!$CFG->debugdeveloper) {
// Only for devs.
return;
}