Commit 92a5b299 authored by webchick's avatar webchick

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

Issue #1809962 by Jose Reyero, sun: Move some locale updates to update.inc for a safe language upgrade.
parent 1bb21b5b
......@@ -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);
}
}
}
......
......@@ -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.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment