- Timestamp:
- 01/01/12 21:42:31 (5 months ago)
- File:
-
- 1 edited
-
trunk/inc/classes/BxDolLanguages.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/classes/BxDolLanguages.php
r15817 r15818 40 40 bx_import('BxTemplLanguages'); 41 41 $GLOBALS['bxDolClasses'][__CLASS__] = new BxTemplLanguages(); 42 43 /** 44 * Trying to initialize default language. 45 */ 46 $GLOBALS['sCurrentLanguage'] = $GLOBALS['bxDolClasses'][__CLASS__]->getCurrentLangName(false); 47 if($GLOBALS['sCurrentLanguage'] != '') { 48 $sPath = BX_DIRECTORY_PATH_ROOT . 'langs/lang-' . $GLOBALS['sCurrentLanguage'] . '.php'; 49 if(file_exists($sPath)) 50 require_once($sPath); 51 } 52 53 $GLOBALS['bxDolClasses'][__CLASS__]->getCurrentLangName(true); 54 if(isset($_GET['lang'])) { 55 bx_import('BxDolPermalinks'); 56 if(BxDolPermalinks::getInstance()->redirectIfNecessary(array('lang'))) 57 exit; 58 } 42 $GLOBALS['bxDolClasses'][__CLASS__]->init(); 59 43 } 60 44 … … 166 150 } 167 151 152 protected function init() { 153 /** 154 * Trying to initialize default language. 155 */ 156 $GLOBALS['sCurrentLanguage'] = $GLOBALS['bxDolClasses'][__CLASS__]->getCurrentLangName(false); 157 if($GLOBALS['sCurrentLanguage'] != '') { 158 $sPath = BX_DIRECTORY_PATH_ROOT . 'langs/lang-' . $GLOBALS['sCurrentLanguage'] . '.php'; 159 if(file_exists($sPath)) 160 require($sPath); 161 } 162 163 $GLOBALS['bxDolClasses'][__CLASS__]->getCurrentLangName(true); 164 if(isset($_GET['lang'])) { 165 bx_import('BxDolPermalinks'); 166 if(BxDolPermalinks::getInstance()->redirectIfNecessary(array('lang'))) 167 exit; 168 } 169 } 170 168 171 protected function tryToGetLang($sLangs, $bSetCookie = false) { 169 172 $sLangs = trim($sLangs);
Note: See TracChangeset
for help on using the changeset viewer.