Index: trunk/core/kernel/application.php =================================================================== diff -u -N -r4850 -r4880 --- trunk/core/kernel/application.php (.../application.php) (revision 4850) +++ trunk/core/kernel/application.php (.../application.php) (revision 4880) @@ -189,19 +189,16 @@ { if($this->InitDone) return false; - if( defined('DEBUG_MODE') && $this->isDebugMode() && dbg_ConstOn('DBG_PROFILE_MEMORY') ) - { + if(defined('DEBUG_MODE') && $this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) { $this->Debugger->appendMemoryUsage('Application before Init:'); } - if( !$this->isDebugMode() && !constOn('DBG_ZEND_PRESENT') ) - { + if (!$this->isDebugMode() && !constOn('DBG_ZEND_PRESENT')) { error_reporting(0); ini_set('display_errors', 0); } - if( !constOn('DBG_ZEND_PRESENT') ) - { + if (!constOn('DBG_ZEND_PRESENT')) { $error_handler = set_error_handler( Array(&$this,'handleError') ); - if($error_handler) $this->errorHandlers[] = $error_handler; + if ($error_handler) $this->errorHandlers[] = $error_handler; } $this->Conn = new kDBConnection(SQL_TYPE, Array(&$this, 'handleSQLError') ); @@ -586,12 +583,9 @@ { $event_manager =& $this->recallObject('EventManager'); - if( $this->isDebugMode() && dbg_ConstOn('DBG_SHOW_HTTPQUERY') ) - { - global $debugger; - $http_query =& $this->recallObject('HTTPQuery'); - $debugger->appendHTML('HTTPQuery:'); - $debugger->dumpVars($http_query->_Params); + if($this->isDebugMode() && constOn('DBG_SHOW_HTTPQUERY')) { + $this->Debugger->appendHTML('HTTPQuery:'); + $this->Debugger->dumpVars($this->HttpQuery->_Params); } $event_manager->ProcessRequest(); @@ -609,8 +603,7 @@ */ function Run() { - if( $this->isDebugMode() && dbg_ConstOn('DBG_PROFILE_MEMORY') ) - { + if($this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) { $this->Debugger->appendMemoryUsage('Application before Run:'); } @@ -643,15 +636,13 @@ }*/ } - if( $this->isDebugMode() && dbg_ConstOn('DBG_PROFILE_MEMORY') ) - { + if($this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) { $this->Debugger->appendMemoryUsage('Application before Parsing:'); } $this->HTML = $this->Parser->Parse( $template_cache->GetTemplateBody($t), $t ); - if( $this->isDebugMode() && dbg_ConstOn('DBG_PROFILE_MEMORY') ) - { + if ($this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) { $this->Debugger->appendMemoryUsage('Application after Parsing:'); } } @@ -670,13 +661,11 @@ */ function Done() { - if( $this->isDebugMode() && dbg_ConstOn('DBG_PROFILE_MEMORY') ) - { + if ($this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) { $this->Debugger->appendMemoryUsage('Application before Done:'); } - if( $this->GetVar('admin') ) - { + if ($this->GetVar('admin')) { $reg = '/('.preg_quote(BASE_PATH, '/').'.*\.html)(#.*){0,1}(")/sU'; $this->HTML = preg_replace($reg, "$1?admin=1$2$3", $this->HTML); } @@ -688,7 +677,7 @@ flush(); - if ($this->isDebugMode() && dbg_ConstOn('DBG_CACHE')) { + if ($this->isDebugMode() && constOn('DBG_CACHE')) { $cache =& $this->recallObject('Cache'); $cache->printStatistics(); } @@ -1335,36 +1324,22 @@ //echo " location : $location
"; - if( $this->isDebugMode() && dbg_ConstOn('DBG_REDIRECT') ) - { - /*if( function_exists('apache_response_headers') ) - { - $this->Debugger->appendHTML('Apache Responce Headers'); - $this->Debugger->dumpVars( apache_response_headers() ); - - $this->Debugger->appendHTML('Apache Request Headers'); - $this->Debugger->dumpVars( apache_request_headers() ); - }*/ + if ($this->isDebugMode() && constOn('DBG_REDIRECT')) { $this->Debugger->appendTrace(); echo "Debug output above!!! Proceed to redirect: $a_location
"; } - else - { - if($js_redirect) - { + else { + if ($js_redirect) { $this->SetVar('t', 'redirect'); $this->SetVar('redirect_to_js', addslashes($a_location) ); $this->SetVar('redirect_to', $a_location); return true; } - else - { - if(headers_sent() != '') - { + else { + if (headers_sent() != '') { echo ''; } - else - { + else { header("$location"); } }