You are here

function lingotek_grid_update in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.bulk_grid.inc \lingotek_grid_update()
  2. 7.4 lingotek.bulk_grid.inc \lingotek_grid_update()
  3. 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 664
Bulk Grid form

Code

function lingotek_grid_update($entity_type) {
  $nids = LingotekSync::getEntityIdsByStatusAndTarget($entity_type, LingotekSync::STATUS_PENDING);
  variable_set('lingotek_pending_last_updated', time());
  if (count($nids) > 0) {
    $_SESSION['lingotek_sync_nodes'] = count($nids);
    lingotek_update_target_progress_batch_create($entity_type, $nids);

    // Run batch operations to sync all 'In Progress' nodes
  }
  else {
    drupal_set_message(t('There are no in-progress translations to check.'));
    drupal_goto('admin/settings/lingotek/manage/' . $entity_type);
  }
}