Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/application.php
Context not available. | |||||
*/ | */ | ||||
public function VerifyLanguageId() | public function VerifyLanguageId() | ||||
{ | { | ||||
$language_id = $this->GetVar('m_lang'); | /** @var LanguagesItem $lang */ | ||||
if ( !$language_id ) { | |||||
$language_id = 'default'; | |||||
} | |||||
$this->SetVar('lang.current_id', $language_id); | |||||
$this->SetVar('m_lang', $language_id); | |||||
$lang_mode = $this->GetVar('lang_mode'); | |||||
$this->SetVar('lang_mode', ''); | |||||
$lang = $this->recallObject('lang.current'); | $lang = $this->recallObject('lang.current'); | ||||
/* @var $lang kDBItem */ | |||||
if ( !$lang->isLoaded() || (!$this->isAdmin && !$lang->GetDBField('Enabled')) ) { | if ( !$lang->isLoaded() || (!$this->isAdmin && !$lang->GetDBField('Enabled')) ) { | ||||
if ( !defined('IS_INSTALL') ) { | if ( !defined('IS_INSTALL') ) { | ||||
$this->ApplicationDie('Unknown or disabled language'); | $this->ApplicationDie('Unknown or disabled language'); | ||||
} | } | ||||
} | } | ||||
$this->SetVar('lang_mode', $lang_mode); | |||||
} | } | ||||
/** | /** | ||||
Context not available. | |||||
return $path; | return $path; | ||||
} | } | ||||
$theme_id = $this->GetVar('m_theme'); | /** @var ThemeItem $theme */ | ||||
if ( !$theme_id ) { | |||||
$theme_id = 'default'; // $this->GetDefaultThemeId(1); // 1 to force front-end mode! | |||||
} | |||||
$this->SetVar('m_theme', $theme_id); | |||||
$this->SetVar('theme.current_id', $theme_id); // KOSTJA: this is to fool theme' getPassedID | |||||
$theme = $this->recallObject('theme.current'); | $theme = $this->recallObject('theme.current'); | ||||
/* @var $theme ThemeItem */ | |||||
if ( !$theme->isLoaded() || !$theme->GetDBField('Enabled') ) { | if ( !$theme->isLoaded() || !$theme->GetDBField('Enabled') ) { | ||||
return false; | return false; | ||||
Context not available. |