You are here

function lingotek_update_marked_item_single in Lingotek Translation 7.7

Updates marked value in the lingotek_entity_metadata table for one row

1 string reference to 'lingotek_update_marked_item_single'
lingotek_menu in ./lingotek.module
Implements hook_menu().

File

./lingotek.bulk_grid.inc, line 871

Code

function lingotek_update_marked_item_single($entity_id, $entity_type, $marked_value) {
  if ($entity_type === 'config') {
    $marked_offset = $entity_id + LingotekSync::MARKED_OFFSET;
    if ($marked_value == LingotekSync::MARKED) {
      LingotekSync::deleteConfigMarkedValue($entity_id, $marked_offset, 'marked');
    }
    else {
      LingotekSync::setConfigMarkedValue($entity_id, $marked_offset);
    }
    return;
  }
  if ($marked_value == LingotekSync::MARKED) {
    lingotek_keystore_delete($entity_type, $entity_id, 'marked');
  }
  else {
    lingotek_keystore($entity_type, $entity_id, 'marked', LingotekSync::MARKED);
  }
}