Issue #1809962 by Jose Reyero, sun: Move some locale updates to update.inc for a safe language upgrade.

8.0.x
webchick 2012-10-11 14:49:49 -07:00
parent 1bb21b5b7c
commit 92a5b29970
2 changed files with 13 additions and 13 deletions

View File

@ -399,6 +399,19 @@ function update_prepare_d8_language() {
// array.
variable_set('language_default', (array) $language_default);
}
// Add column to track customized string status to locales_target.
// When updating in a non-English language, the locale translation system is
// triggered, which attempts to query string translations already.
if (db_table_exists('locales_target') && !db_field_exists('locales_target', 'customized')) {
$spec = array(
'type' => 'int',
'not null' => TRUE,
'default' => 0, // LOCALE_NOT_CUSTOMIZED
'description' => 'Boolean indicating whether the translation is custom to this site.',
);
db_add_field('locales_target', 'customized', $spec);
}
}
}

View File

@ -512,19 +512,6 @@ function locale_update_8005() {
db_add_primary_key('locales_target', array('language', 'lid'));
}
/**
* Add column to track customized string status to locales_target.
*/
function locale_update_8006() {
$spec = array(
'type' => 'int',
'not null' => TRUE,
'default' => 0, // LOCALE_NOT_CUSTOMIZED
'description' => 'Boolean indicating whether the translation is custom to this site.',
);
db_add_field('locales_target', 'customized', $spec);
}
/**
* Convert language_negotiation_* variables to use the new callbacks.
*