function lingotek_update_7503 in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.5 lingotek.install \lingotek_update_7503()
- 7.6 lingotek.install \lingotek_update_7503()
Migrate any CUSTOM profile usage within entity_profiles
File
- ./
lingotek.install, line 759
Code
function lingotek_update_7503(&$sandbox) {
lingotek_extend_metadata_tables();
$profiles = variable_get('lingotek_entity_profiles');
foreach ($profiles as $profile_key => $profile) {
foreach ($profile as $bundle => $profile_id) {
if ($profile_id === LingotekSync::PROFILE_CUSTOM) {
$profiles[$profile_key][$bundle] = LingotekSync::PROFILE_AUTOMATIC;
}
}
}
variable_set('lingotek_entity_profiles', $profiles);
}