function globallink_taxonomy_get_submission_status in GlobalLink Connect for Drupal 7.5
Same name and namespace in other branches
- 7.6 globallink_taxonomy/globallink_taxonomy.inc \globallink_taxonomy_get_submission_status()
Gets taxonomy submission status.
1 call to globallink_taxonomy_get_submission_status()
- globallink_taxonomy_active_select_form in globallink_taxonomy/
globallink_taxonomy_active_submissions.inc - Builds form to allow selection of specific taxonomy submission by ID.
File
- globallink_taxonomy/
globallink_taxonomy.inc, line 1243
Code
function globallink_taxonomy_get_submission_status() {
module_load_include('inc', 'globallink', 'globallink_settings');
module_load_include('inc', 'globallink', 'gl_ws/gl_ws_common');
$query = db_select('globallink_core_taxonomy', 'tc');
$query
->fields('tc', array(
'submission_ticket',
));
$query
->distinct();
$query
->condition('status', 'Sent for Translations', '=');
$results = $query
->execute();
foreach ($results as $row) {
if ($row->submission_ticket) {
try {
$pd4 = globallink_get_project_director_details();
$doc_status = globallink_get_status($pd4, $row->submission_ticket);
if (!$doc_status || $doc_status == 'CANCELLED') {
globallink_taxonomy_update_submission_status($row->submission_ticket);
}
} catch (SoapFault $se) {
globallink_taxonomy_update_submission_status($row->submission_ticket);
} catch (Exception $ex) {
globallink_taxonomy_update_submission_status($row->submission_ticket);
}
}
}
}