function lingotek_update_7207 in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.7 lingotek.install \lingotek_update_7207()
- 7.2 lingotek.install \lingotek_update_7207()
- 7.4 lingotek.install \lingotek_update_7207()
- 7.5 lingotek.install \lingotek_update_7207()
- 7.6 lingotek.install \lingotek_update_7207()
Change the value for LINGOTEK_ENABLED to a string to avoid collision.
File
- ./
lingotek.install, line 324 - Installation for Lingotek Community Translation Module.
Code
function lingotek_update_7207(&$sandbox) {
$updated = array();
foreach (array_keys(node_type_get_names()) as $type) {
$name = 'language_content_type_' . $type;
if (variable_get($name) == 5) {
$updated[] = $type;
variable_set($name, LINGOTEK_ENABLED);
}
}
if (count($updated)) {
$t_args = array(
'@updated' => implode(', ', $updated),
);
return t("Updated @count content type(s) to use 'lingotek' instead of '5' for the identifier: @updated", $t_args);
}
else {
return t('No updates necessary.');
}
}