You are here

function globallink_block_get_distinct_active_submission_names in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.6 globallink_block/globallink_block.inc \globallink_block_get_distinct_active_submission_names()

Gets distinct active block submission names.

Return value

array Array of distinct active block submission names.

1 call to globallink_block_get_distinct_active_submission_names()
globallink_block_receive_filter_form in globallink_block/globallink_block_receive.inc
Builds form to filter blocks to receive on dashboard.

File

globallink_block/globallink_block.inc, line 830

Code

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