HomeHelpTrac

Changeset 15818 for trunk/inc


Ignore:
Timestamp:
01/01/12 21:42:31 (5 months ago)
Author:
Anton Lesnikov
Message:
  1. Improvements in language recompilation.
  2. Improvements in Studio -> Menu Builder
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/classes/BxDolLanguages.php

    r15817 r15818  
    4040            bx_import('BxTemplLanguages'); 
    4141            $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(); 
    5943        } 
    6044 
     
    166150    } 
    167151 
     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 
    168171    protected function tryToGetLang($sLangs, $bSetCookie = false) { 
    169172        $sLangs = trim($sLangs); 
Note: See TracChangeset for help on using the changeset viewer.