You are here

function globallink_beans_get_distinct_active_submission_names in GlobalLink Connect for Drupal 7.6

Gets distinct active beans submission names.

Return value

array Array of distinct active beans submission names.

1 call to globallink_beans_get_distinct_active_submission_names()
globallink_beans_receive_filter_form in globallink_beans/globallink_beans_receive.inc
Builds form to filter beans to receive on dashboard.

File

globallink_beans/globallink_beans.inc, line 823

Code

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