You are here

function globallink_entity_update_row_document in GlobalLink Connect for Drupal 7.6

Same name and namespace in other branches
  1. 7.5 globallink_entity/globallink_entity.inc \globallink_entity_update_row_document()

Updates entity rows to reflect translation status.

Parameters

array $globallink_arr: Array of GlobalLink objects.

1 call to globallink_entity_update_row_document()
globallink_entity_cancel_select_records in globallink_entity/globallink_entity.inc
Cancels entity records.

File

globallink_entity/globallink_entity.inc, line 376

Code

function globallink_entity_update_row_document(&$globallink_arr) {
  foreach ($globallink_arr as $globallink) {
    if ($globallink->cancelled) {
      db_update('globallink_core_entity')
        ->fields(array(
        'status' => 'Pending Translations',
        'timestamp' => REQUEST_TIME,
        'changed' => 1,
      ))
        ->condition('rid', $globallink->tptRowId, '=')
        ->execute();
    }
  }
}