You are here

function globallink_menu_get_active_submission_names in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.6 globallink_menu/globallink_menu.inc \globallink_menu_get_active_submission_names()

Gets active menu submission names.

Return value

array Array of active menu submission names.

2 calls to globallink_menu_get_active_submission_names()
globallink_menu_active_form in globallink_menu/globallink_menu_active_submissions.inc
Builds form to show all active menu submissions.
globallink_menu_active_select_form in globallink_menu/globallink_menu_active_submissions.inc
Builds form to allow selection of specific menu submission by ID.

File

globallink_menu/globallink_menu.inc, line 279

Code

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