Ignore:
Timestamp:
10/19/08 16:49:42 (4 years ago)
Author:
hverton
Message:

updated the translation module to work with the new default_locale setting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/ExiteCMS/translations/php-files/modules/translations/langpack.template

    r1869 r1876  
    146146 
    147147        // check the last update of the locale 
    148         $variables['last_update'] = isset($settings['LanguagePack.'.LP_LANGUAGE]) ? $settings['LanguagePack.'.LP_LANGUAGE] : dbfunction("MAX(locales_datestamp)", "locales", "locales_code = '".LP_LOCALE."' AND locales_name NOT LIKE 'modules%'"); 
     148        $variables['last_update'] = isset($settings['LanguagePack.'.LP_LANGUAGE]) ? $settings['LanguagePack.'.LP_LANGUAGE] : min(LP_DATE - 1, dbfunction("MAX(locales_datestamp)", "locales", "locales_code = '".LP_LOCALE."' AND locales_name NOT LIKE 'modules%'")); 
    149149         
    150150        // check if this language pack has been installed 
    151151        $variables['can_install'] = dbcount("(*)", "locale", "locale_code = '".LP_LOCALE."'") == 0; 
    152         $variables['can_remove'] = LP_LOCALE != "en" && $variables['can_install'] == false; 
     152        $variables['can_remove'] = LP_LOCALE != $settings['default_locale'] && $variables['can_install'] == false; 
    153153        $variables['can_upgrade'] = $variables['can_install'] == false && $variables['last_update'] < LP_DATE; 
    154154     
Note: See TracChangeset for help on using the changeset viewer.