function lingotek_grid_update in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.4 lingotek.bulk_grid.inc \lingotek_grid_update()
- 7.5 lingotek.bulk_grid.inc \lingotek_grid_update()
- 7.6 lingotek.bulk_grid.inc \lingotek_grid_update()
1 string reference to 'lingotek_grid_update'
- lingotek_menu in ./
lingotek.module - Implements hook_menu().
File
- ./
lingotek.bulk_grid.inc, line 1141
Code
function lingotek_grid_update($entity_type) {
if ($entity_type == 'config') {
$lids = LingotekConfigSet::getLidsByStatus(LingotekSync::STATUS_PENDING);
if (empty($lids)) {
drupal_set_message(t('There are no <i>In-Progress</i> translations to check.'));
drupal_goto('admin/settings/lingotek/manage/' . $entity_type);
}
lingotek_config_update_selected($lids);
return;
}
$active_locales = lingotek_get_target_locales();
$entity_ids = LingotekSync::getEntityIdsByStatuses($entity_type, array(
LingotekSync::STATUS_PENDING,
LingotekSync::STATUS_READY_INTERIM,
LingotekSync::STATUS_INTERIM,
), $active_locales);
variable_set('lingotek_pending_last_updated', time());
if (count($entity_ids) > 0) {
$_SESSION['lingotek_sync_nodes'] = count($entity_ids);
lingotek_update_target_progress_batch_create($entity_type, $entity_ids);
// Run batch operations to sync all 'In Progress' nodes
}
else {
drupal_set_message(t('There are no <i>In-Progress</i> translations to check.'));
drupal_goto('admin/settings/lingotek/manage/' . $entity_type);
}
}