Changeset 1869 in ExiteCMS for modules/ExiteCMS/translations/php-files/modules/translations/langpack.template
- Timestamp:
- 10/19/08 11:41:51 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/ExiteCMS/translations/php-files/modules/translations/langpack.template
r1835 r1869 119 119 if (!CMS_CLI) $variables['message'] .= sprintf($locale['307'],LP_LOCALE, LP_LANGUAGE); 120 120 } 121 // update the install timestamp in the config 122 if (isset($settings['LanguagePack.'.LP_LANGUAGE])) { 123 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".LP_DATE."' WHERE cfg_name = 'LanguagePack.".LP_LANGUAGE."'"); 124 } else { 125 $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('LanguagePack.".LP_LANGUAGE."', '".LP_DATE."')"); 126 } 121 127 } 122 128 } … … 140 146 141 147 // check the last update of the locale 142 $variables['last_update'] = 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] : dbfunction("MAX(locales_datestamp)", "locales", "locales_code = '".LP_LOCALE."' AND locales_name NOT LIKE 'modules%'"); 143 149 144 150 // check if this language pack has been installed 145 151 $variables['can_install'] = dbcount("(*)", "locale", "locale_code = '".LP_LOCALE."'") == 0; 146 $variables['can_remove'] = $variables['can_install'] ? FALSE : TRUE;147 $variables['can_upgrade'] = $variables['can_ remove'];152 $variables['can_remove'] = LP_LOCALE != "en" && $variables['can_install'] == false; 153 $variables['can_upgrade'] = $variables['can_install'] == false && $variables['last_update'] < LP_DATE; 148 154 149 155 // define the body panel variables
Note: See TracChangeset
for help on using the changeset viewer.
