You are here

function globallink_interface_get_active_submission_names in GlobalLink Connect for Drupal 7.6

Gets active interface submission names.

Return value

array Array of active interface submission names.

2 calls to globallink_interface_get_active_submission_names()
globallink_interface_active_form in globallink_interface/globallink_interface_active_submissions.inc
Builds form to show all active interface submissions.
globallink_interface_active_select_form in globallink_interface/globallink_interface_active_submissions.inc
Builds form to allow selection of specific interface submission by ID.

File

globallink_interface/globallink_interface.inc, line 479

Code

function globallink_interface_get_active_submission_names() {
  $query = db_select('globallink_core_interface', 'tco');
  $query
    ->condition('status', array(
    'Sent for Translations',
    'Error',
  ), 'IN');
  $query
    ->distinct();
  $query
    ->fields('tco');
  $results = $query
    ->execute();
  $arr = array(
    '' => '-- Select a Submission --',
  );
  foreach ($results as $row) {
    $arr[$row->submission_ticket] = $row->submission;
  }
  return $arr;
}