summaryrefslogtreecommitdiff
path: root/modules/locale
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-06-22 13:21:38 +0000
committerDries Buytaert <dries@buytaert.net>2009-06-22 13:21:38 +0000
commitfabaaaaa6e065b1f8f89c00b31b947fa7861d13c (patch)
treec9cb0fdb1b99300edeb7b943ffb8eb9bbab7d759 /modules/locale
parentf96c141f5aa99ed414eba4e0a520e5b4d9f91b76 (diff)
downloadbrdo-fabaaaaa6e065b1f8f89c00b31b947fa7861d13c.tar.gz
brdo-fabaaaaa6e065b1f8f89c00b31b947fa7861d13c.tar.bz2
- Patch #278592 by catch, Dave Reid, lilou et al: remove D5 to D6 updates.
Diffstat (limited to 'modules/locale')
-rw-r--r--modules/locale/locale.install199
1 files changed, 0 insertions, 199 deletions
diff --git a/modules/locale/locale.install b/modules/locale/locale.install
index 2c7a7db7c..d33d25ba7 100644
--- a/modules/locale/locale.install
+++ b/modules/locale/locale.install
@@ -31,205 +31,6 @@ function locale_install() {
}
/**
- * @defgroup updates-5.x-to-6.x Locale updates from 5.x to 6.x
- * @{
- */
-
-/**
- * {locales_meta} table became {languages}.
- */
-function locale_update_6000() {
- $ret = array();
-
- $schema['languages'] = array(
- 'fields' => array(
- 'language' => array(
- 'type' => 'varchar',
- 'length' => 12,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'name' => array(
- 'type' => 'varchar',
- 'length' => 64,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'native' => array(
- 'type' => 'varchar',
- 'length' => 64,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'direction' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- ),
- 'enabled' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- ),
- 'plurals' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- ),
- 'formula' => array(
- 'type' => 'varchar',
- 'length' => 128,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'domain' => array(
- 'type' => 'varchar',
- 'length' => 128,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'prefix' => array(
- 'type' => 'varchar',
- 'length' => 128,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'weight' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- ),
- 'javascript' => array( //Adds a column to store the filename of the JavaScript translation file.
- 'type' => 'varchar',
- 'length' => 32,
- 'not null' => TRUE,
- 'default' => '',
- ),
- ),
- 'primary key' => array('language'),
- 'indexes' => array(
- 'list' => array('weight', 'name'),
- ),
- );
-
- db_create_table($ret, 'languages', $schema['languages']);
-
- // Save the languages
- $ret[] = update_sql("INSERT INTO {languages} (language, name, native, direction, enabled, plurals, formula, domain, prefix, weight) SELECT locale, name, name, 0, enabled, plurals, formula, '', locale, 0 FROM {locales_meta}");
-
- // Save the language count in the variable table
- $count = db_result(db_query('SELECT COUNT(*) FROM {languages} WHERE enabled = 1'));
- variable_set('language_count', $count);
-
- // Save the default language in the variable table
- $default = db_fetch_object(db_query('SELECT * FROM {locales_meta} WHERE isdefault = 1'));
- variable_set('language_default', (object) array('language' => $default->locale, 'name' => $default->name, 'native' => '', 'direction' => 0, 'enabled' => 1, 'plurals' => $default->plurals, 'formula' => $default->formula, 'domain' => '', 'prefix' => $default->locale, 'weight' => 0));
-
- $ret[] = update_sql("DROP TABLE {locales_meta}");
- return $ret;
-}
-
-/**
- * Change locale column to language. The language column is added by
- * update_fix_d6_requirements() in update.php to avoid a large number
- * of error messages from update.php. All we need to do here is copy
- * locale to language and then drop locale.
- */
-function locale_update_6001() {
- $ret = array();
- $ret[] = update_sql('UPDATE {locales_target} SET language = locale');
- db_drop_field($ret, 'locales_target', 'locale');
- return $ret;
-}
-
-/**
- * Remove empty translations, we don't need these anymore.
- */
-function locale_update_6002() {
- $ret = array();
- $ret[] = update_sql("DELETE FROM {locales_target} WHERE translation = ''");
- return $ret;
-}
-
-/**
- * Prune strings with no translations (will be automatically re-registered if still in use)
- */
-function locale_update_6003() {
- $ret = array();
- $ret[] = update_sql("DELETE FROM {locales_source} WHERE lid NOT IN (SELECT lid FROM {locales_target})");
- return $ret;
-}
-
-/**
- * Fix remaining inconsistent indexes.
- */
-function locale_update_6004() {
- $ret = array();
- db_add_index($ret, 'locales_target', 'language', array('language'));
-
- switch ($GLOBALS['db_type']) {
- case 'pgsql':
- db_drop_index($ret, 'locales_source', 'source');
- db_add_index($ret, 'locales_source', 'source', array(array('source', 30)));
- break;
- }
-
- return $ret;
-}
-
-/**
- * Change language setting variable of content types.
- *
- * Use language_content_type_<content_type> instead of language_<content_type>
- * so content types such as 'default', 'count' or 'negotiation' will not
- * interfere with language variables.
- */
-function locale_update_6005() {
- foreach (node_type_get_types() as $type => $content_type) {
- // Default to NULL, so we can skip dealing with non-existent settings.
- $setting = variable_get('language_' . $type);
- if ($type == 'default' && is_numeric($setting)) {
- // language_default was overwritten with the content type setting,
- // so reset the default language and save the content type setting.
- variable_set('language_content_type_default', $setting);
- variable_del('language_default');
- drupal_set_message('The default language setting has been reset to its default value. Check the ' . l('language configuration page', 'admin/settings/language') . ' to configure it correctly.');
- }
- elseif ($type == 'negotiation') {
- // language_content_type_negotiation is an integer either if it is
- // the negotiation setting or the content type setting.
- // The language_negotiation setting is not reset, but
- // the user is alerted that this setting possibly was overwritten
- variable_set('language_content_type_negotiation', $setting);
- drupal_set_message('The language negotiation setting was possibly overwritten by a content type of the same name. Check the ' . l('language configuration page', 'admin/settings/language/configure') . ' and the ' . l('<em>' . $content_type->name . "</em> content type's multilingual support settings", 'admin/build/types/negotiation', array('html' => TRUE)) . ' to configure them correctly.');
- }
- elseif (!is_null($setting)) {
- // Change the language setting variable for any other content type.
- // Do not worry about language_count, it will be updated below.
- variable_set('language_content_type_' . $type, $setting);
- variable_del('language_' . $type);
- }
- }
- // Update language count variable that might be overwritten.
- $count = db_result(db_query('SELECT COUNT(*) FROM {languages} WHERE enabled = 1'));
- variable_set('language_count', $count);
- return array();
-}
-
-/**
- * Allow longer location.
- */
-function locale_update_6006() {
- $ret = array();
- db_change_field($ret, 'locales_source', 'location', 'location', array('type' => 'text', 'not null' => FALSE));
- return $ret;
-}
-
-/**
- * @} End of "defgroup updates-5.x-to-6.x"
- */
-
-/**
* @defgroup updates-6.x-to-7.x Locale updates from 6.x to 7.x
* @{
*/