diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-26 08:27:09 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-26 08:27:09 +0000 |
commit | 39d776faa951a40eab75d035aa728fecd2803b58 (patch) | |
tree | d203a5539ccf1c42bb9671c2635df821d6bc2ad6 /modules/locale | |
parent | 7531f956aa542558d601a3d4f3039f4041793ec0 (diff) | |
download | brdo-39d776faa951a40eab75d035aa728fecd2803b58.tar.gz brdo-39d776faa951a40eab75d035aa728fecd2803b58.tar.bz2 |
#157682 by bjaspan, chx and JirkaRybka: update.php for Drupal 6, to allow near flowless updates
Diffstat (limited to 'modules/locale')
-rw-r--r-- | modules/locale/locale.install | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/modules/locale/locale.install b/modules/locale/locale.install index 2dabbe8a4..b532fecfa 100644 --- a/modules/locale/locale.install +++ b/modules/locale/locale.install @@ -75,19 +75,15 @@ function locale_update_6001() { } /** - * Add multiple text group support to allow for user defined string translation. + * 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_6002() { $ret = array(); - switch ($GLOBALS['db_type']) { - case 'mysql': - case 'mysqli': - $ret[] = update_sql("ALTER TABLE {locales_source} ADD textgroup varchar(255) NOT NULL default ''"); - break; - case 'pgsql': - db_add_column($ret, 'locales_source', 'textgroup', 'varchar(255)', array('default' => "''", 'not null' => TRUE)); - break; - } + $ret[] = update_sql('UPDATE {locales_target} SET language = locale'); + db_drop_field($ret, 'locales_target', 'locale'); return $ret; } |