Index: trunk/core/kernel/application.php =================================================================== diff -u -r3212 -r3214 --- trunk/core/kernel/application.php (.../application.php) (revision 3212) +++ trunk/core/kernel/application.php (.../application.php) (revision 3214) @@ -212,16 +212,11 @@ $this->VerifyThemeId(); } - $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) ); - if( !$this->RecallVar('UserGroups') ) { - $ses =& $this->recallObject('Session'); - $user_groups = trim($ses->GetField('GroupList'), ','); + $session =& $this->recallObject('Session'); + $user_groups = trim($session->GetField('GroupList'), ','); if (!$user_groups) $user_groups = $this->ConfigValue('User_GuestGroup'); $this->StoreVar('UserGroups', $user_groups); } @@ -230,6 +225,10 @@ $this->SetVar('visits_id', $this->RecallVar('visit_id') ); + $this->SetVar('lang.current_id', $this->GetVar('m_lang') ); + $this->SetVar('theme.current_id', $this->GetVar('m_theme') ); + $language =& $this->recallObject( 'lang.current', null, Array('live_table' => true) ); + $this->ValidateLogin(); // TODO: write that method if( $this->isDebugMode() ) @@ -315,13 +314,10 @@ function GetPrimaryCurrency() { - $this->setUnitOption('mod','AutoLoad',false); - $module =& $this->recallObject('mod'); - $this->setUnitOption('mod','AutoLoad',true); - - if( $module->Load('In-Commerce') && $module->GetDBField('Loaded') == 1 ) + $has_incommerce = getArrayValue($this->ModuleInfo, 'In-Commerce'); + if($has_incommerce && $has_incommerce['Loaded'] ) { - $table = $this->getUnitOption('curr','TableName'); + $table = $this->getUnitOption('curr', 'TableName'); return $this->DB->GetOne('SELECT ISO FROM '.$table.' WHERE IsPrimary = 1'); } else