You are here

function globallink_get_distinct_active_submission_names in GlobalLink Connect for Drupal 7.6

Same name and namespace in other branches
  1. 7.5 globallink_node.inc \globallink_get_distinct_active_submission_names()

Gets all active submission names.

Return value

array Array containing all active submission names.

3 calls to globallink_get_distinct_active_submission_names()
globallink_dashboard_active in ./globallink_active_submissions.inc
Builds form to show all active GlobalLink submissions.
globallink_node_active_select_form in ./globallink_active_submissions.inc
Builds form to allow selection of specific GlobalLink submission by ID.
globallink_node_receive_filter_form in ./globallink_receive_translations.inc
Builds form to filter GlobalLink nodes to receive on dashboard.

File

./globallink_node.inc, line 370

Code

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