Index: trunk/core/kernel/session/session.php =================================================================== diff -u -r2853 -r2919 --- trunk/core/kernel/session/session.php (.../session.php) (revision 2853) +++ trunk/core/kernel/session/session.php (.../session.php) (revision 2919) @@ -635,7 +635,10 @@ { if( $this->Application->GetVar('t') != 'help' ) { - $this->StoreVar('last_template', basename($_SERVER['PHP_SELF']).'|'.substr($this->Application->BuildEnv($this->Application->GetVar('t'), Array('m_opener' => 'u'), 'all'), strlen(ENV_VAR_NAME)+1 )); + $last_env = $this->Application->BuildEnv($this->Application->GetVar('t'), Array('m_opener' => 'u'), 'all'); + $last_template = basename($_SERVER['PHP_SELF']).'|'; + $last_template .= substr($last_env, strlen(ENV_VAR_NAME) + 1); + $this->StoreVar('last_template', $last_template); } $this->StoreVar('last_env', substr($this->Application->BuildEnv($this->Application->GetVar('t'),Array('pass'=>'all')), strlen(ENV_VAR_NAME)+1 )); $this->PrintSession('after save'); Index: trunk/kernel/startup.php =================================================================== diff -u -r2882 -r2919 --- trunk/kernel/startup.php (.../startup.php) (revision 2882) +++ trunk/kernel/startup.php (.../startup.php) (revision 2919) @@ -17,7 +17,7 @@ // KENEL4 INIT: BEGIN if($FrontEnd != 1 && !defined('ADMIN') ) define('ADMIN', 1); - define('APPLICATION_CLASS', 'MyApplication'); + if( !defined('APPLICATION_CLASS') ) define('APPLICATION_CLASS', 'MyApplication'); include_once(FULL_PATH.'/kernel/kernel4/startup.php'); // just to make sure that this is correctly detected