Index: trunk/core/kernel/globals.php =================================================================== diff -u -N -r3210 -r3216 --- trunk/core/kernel/globals.php (.../globals.php) (revision 3210) +++ trunk/core/kernel/globals.php (.../globals.php) (revision 3216) @@ -46,7 +46,7 @@ */ function print_pre($data, $label='') { - if( defined('DEBUG_MODE') && DEBUG_MODE ) + if( constOn('DEBUG_MODE') ) { global $debugger; if($label) $debugger->appendHTML(''.$label.''); @@ -186,7 +186,7 @@ { function k4_include_once($file) { - if ( defined('DEBUG_MODE') && DEBUG_MODE && defined('DBG_PROFILE_INCLUDES') && DBG_PROFILE_INCLUDES ) + if ( constOn('DEBUG_MODE') && isset($debugger) && constOn('DBG_PROFILE_INCLUDES') ) { if ( in_array($file, get_required_files()) ) return; @@ -369,14 +369,17 @@ return $result; } - /** - * Checks if constant is defined and has positive value - * - * @param string $const_name - * @return bool - */ - function constOn($const_name) + if( !function_exists('constOn') ) { - return defined($const_name) && constant($const_name); + /** + * Checks if constant is defined and has positive value + * + * @param string $const_name + * @return bool + */ + function constOn($const_name) + { + return defined($const_name) && constant($const_name); + } } ?> \ No newline at end of file