function globallink_cp_get_active_submission_by_id in GlobalLink Connect for Drupal 7.7
1 call to globallink_cp_get_active_submission_by_id()
- globallink_commerce_dashboard_form in globallink_commerce/
globallink_commerce_send.inc - Builds form to create a commerce submission.
File
- globallink_commerce/
globallink_commerce.inc, line 593
Code
function globallink_cp_get_active_submission_by_id($id) {
$query = db_select('globallink_document', 'gd');
$query
->join('globallink_submission', 'gs', 'gd.submission_rid = gs.rid');
$query
->condition('gd.object_id', $id, '=');
$query
->condition('gd.entity_type', GLOBALLINK_ENTITY_TYPE_COM, '=');
$or = db_or();
$or
->condition('gd.target_status', GLOBALLINK_STATUS_TRANSLATION_SENT, '=');
$or
->condition('gd.target_status', GLOBALLINK_STATUS_TRANSLATION_COMPLETED, '=');
$or
->condition('gd.target_status', GLOBALLINK_STATUS_TRANSLATION_ERROR, '=');
$query
->condition($or);
$query
->fields('gd');
$query
->fields('gs', array(
'submission',
'source_lang_code',
'source_lang_name',
'sub_target_lang_code',
'sub_target_lang_name',
));
$results = $query
->execute()
->fetchAll();
return $results;
}