function lingotek_cleanup_utility in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.2 lingotek.util.inc \lingotek_cleanup_utility()
- 7.3 lingotek.util.inc \lingotek_cleanup_utility()
Clean-up utility
1 call to lingotek_cleanup_utility()
2 string references to 'lingotek_cleanup_utility'
- lingotek_admin_utilities_form in ./
lingotek.admin.inc - Utilities Form
- lingotek_batch_disassociate_content in ./
lingotek.batch.inc - Batch Create: Lingotek Disassociate Translations
File
- ./
lingotek.util.inc, line 1012 - Utility functions.
Code
function lingotek_cleanup_utility($show_messages = TRUE, $autoset_batch = TRUE) {
LingotekLog::trace(__METHOD__);
lingotek_set_priority();
lingotek_set_defaults();
lingotek_migration_1();
lingotek_migration_2();
lingotek_migration_3();
lingotek_add_missing_locales();
// fills in any missing lingotek_locale values to the languages table
if (module_exists('field_collection')) {
lingotek_add_default_lang_to_field_collections();
// a temp solution, setting 'und' values for field collections
lingotek_add_neutral_lang_to_field_collections();
}
$cleanup_batch = lingotek_field_language_data_cleanup_batch_create($autoset_batch = $autoset_batch);
if ($show_messages) {
drupal_set_message(t('The field data cleanup utility completed.'));
}
lingotek_batch_identify_content();
// Identify pre-existing content (based on these new content-type settings)
if ($show_messages) {
drupal_set_message(t('Translatable content has been identified.'));
}
if ($cleanup_batch && is_array($cleanup_batch)) {
return $cleanup_batch;
}
}