From 39d776faa951a40eab75d035aa728fecd2803b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Sun, 26 Aug 2007 08:27:09 +0000 Subject: #157682 by bjaspan, chx and JirkaRybka: update.php for Drupal 6, to allow near flowless updates --- modules/locale/locale.install | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'modules/locale') 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; } -- cgit v1.2.3