You are here

function lingotek_update_unmarked_items in Lingotek Translation 7.7

Updates unmarked value in the lingotek_entity_metadata table

1 string reference to 'lingotek_update_unmarked_items'
lingotek_get_unmarked_batch_elements in ./lingotek.batch.inc
Update unmarked entities: Creates the batch elements for unmarked entities.

File

./lingotek.bulk_grid.inc, line 917

Code

function lingotek_update_unmarked_items($entity_type, $entity_id, &$context) {
  if (empty($context['results'])) {
    $context['results']['unmarked'] = 1;
    if ($entity_type === 'config') {
      $context['results']['entity_type'] = 'config';
    }
  }
  else {
    $context['results']['unmarked'] += 1;
  }
  if ($entity_type === 'config') {
    $marked_offset = $entity_id + LingotekSync::MARKED_OFFSET;
    LingotekSync::deleteConfigMarkedValue($entity_id, $marked_offset, 'marked');
  }
  else {
    lingotek_keystore_delete($entity_type, $entity_id, 'marked');
  }
}