You are here

function globallink_taxonomy_get_distinct_active_submission_names in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.6 globallink_taxonomy/globallink_taxonomy.inc \globallink_taxonomy_get_distinct_active_submission_names()

Gets distinct active taxonomy submission names.

Return value

array Array of distinct active taxonomy submission names.

1 call to globallink_taxonomy_get_distinct_active_submission_names()
globallink_taxonomy_receive_filter_form in globallink_taxonomy/globallink_taxonomy_receive.inc
Builds form to filter taxonomies to receive on dashboard.

File

globallink_taxonomy/globallink_taxonomy.inc, line 1206

Code

function globallink_taxonomy_get_distinct_active_submission_names() {
  $query = db_select('globallink_core_taxonomy', '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;
}