Index: trunk/core/kernel/application.php =================================================================== diff -u -r3229 -r3282 --- trunk/core/kernel/application.php (.../application.php) (revision 3229) +++ trunk/core/kernel/application.php (.../application.php) (revision 3282) @@ -168,7 +168,7 @@ if( $this->isDebugMode() && dbg_ConstOn('DBG_PROFILE_MEMORY') ) { - $GLOBALS['debugger']->appendMemoryUsage('Application before Init:'); + $this->Debugger->appendMemoryUsage('Application before Init:'); } if( !$this->isDebugMode() && !constOn('DBG_ZEND_PRESENT') ) @@ -212,8 +212,7 @@ $this->Phrases->Init('phrases'); $this->VerifyThemeId(); } - - if( $this->GetVar('m_cat_id') === false ) $this->SetVar('m_cat_id', 0); + if( !$this->RecallVar('UserGroups') ) { $session =& $this->recallObject('Session'); @@ -228,13 +227,14 @@ $this->SetVar('lang.current_id', $this->GetVar('m_lang') ); $this->SetVar('theme.current_id', $this->GetVar('m_theme') ); + if( $this->GetVar('m_cat_id') === false ) $this->SetVar('m_cat_id', 0); $language =& $this->recallObject( 'lang.current', null, Array('live_table' => true) ); $this->ValidateLogin(); // TODO: write that method if( $this->isDebugMode() ) { - $GLOBALS['debugger']->profileFinish('kernel4_startup'); + $this->Debugger->profileFinish('kernel4_startup'); } $this->InitDone = true; @@ -553,7 +553,7 @@ /*if (constOn('EXPERIMENTAL_PRE_PARSE')) { $data = serialize($this->PreParsedCache); - $this->DB->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("blocks_cache", '.$this->DB->qstr($data).', '.time().')'); + $this->DB->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("blocks_cache", '.$this->DB->qstr($data).', '.adodb_mktime().')'); }*/ } @@ -1062,9 +1062,10 @@ { if($js_redirect) { - $this->InitParser(); - $block_params = Array('name' => 'redirect', 'redirect_to_js' => addslashes($a_location), 'redirect_to' => $a_location ); - echo $this->ParseBlock($block_params); + $this->SetVar('t', 'redirect'); + $this->SetVar('redirect_to_js', addslashes($a_location) ); + $this->SetVar('redirect_to', $a_location); + return true; } else { @@ -1078,7 +1079,7 @@ } } } - + $session =& $this->recallObject('Session'); $session->SaveData(); $this->SaveBlocksCache(); @@ -1443,7 +1444,7 @@ if( constOn('SILENT_LOG') ) { $fp = fopen(FULL_PATH.'/silent_log.txt','a'); - $time = date('d/m/Y H:i:s'); + $time = adodb_date('d/m/Y H:i:s'); fwrite($fp, '['.$time.'] #'.$errno.': '.strip_tags($errstr).' in ['.$errfile.'] on line '.$errline."\n"); fclose($fp); }