You are here

function globallink_interface_get_distinct_active_submission_names in GlobalLink Connect for Drupal 7.6

Gets distinct active interface submission names.

Return value

array Array of distinct active interface submission names.

1 call to globallink_interface_get_distinct_active_submission_names()
globallink_interface_receive_filter_form in globallink_interface/globallink_interface_receive.inc
Builds form to filter interfaces to receive on dashboard.

File

globallink_interface/globallink_interface.inc, line 749

Code

function globallink_interface_get_distinct_active_submission_names() {
  $query = db_select('globallink_core_interface', 'tc');
  $query
    ->condition('status', array(
    'Sent for Translations',
    'Error',
  ), 'IN');
  $query
    ->distinct();
  $query
    ->fields('tc');
  $results = $query
    ->execute();
  $arr = array(
    '[any]' => t('Any'),
  );
  foreach ($results as $row) {
    $arr[$row->submission] = $row->submission;
  }
  return $arr;
}