You are here

function globallink_get_row_id_from_submission in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.6 globallink_node.inc \globallink_get_row_id_from_submission()

Retrieves the row id.

Parameters

string $submission_ticket: The translation submission ticket.

string $document_ticket: The translation document ticket.

string $target_locale: The locale the submission is being translated into.

Return value

int The id of the row.

1 call to globallink_get_row_id_from_submission()
globallink_dashboard_receive in ./globallink_receive_translations.inc
Builds form to receive a GlobalLink submission.

File

./globallink_node.inc, line 422

Code

function globallink_get_row_id_from_submission($submission_ticket, $document_ticket, $target_locale) {
  $query = db_select('globallink_core', 'tc');
  $query
    ->condition('submission_ticket', $submission_ticket, '=');
  $query
    ->condition('document_ticket', $document_ticket, '=');
  $query
    ->condition('target', $target_locale, '=');
  $query
    ->fields('tc');
  $results = $query
    ->execute();
  foreach ($results as $row) {

    //Return the first one
    return $row->rid;
  }
}