You are here

function globallink_get_pd_projects in GlobalLink Connect for Drupal 7.7

Same name and namespace in other branches
  1. 7.5 globallink.inc \globallink_get_pd_projects()
  2. 7.6 globallink.inc \globallink_get_pd_projects()

Gets project director projects.

Return value

array Array of project director projects.

File

./globallink.inc, line 1091
Miscellaneous GlobalLink functions for node translations (non-entity).

Code

function globallink_get_pd_projects() {
  $proj_arr = variable_get('globallink_pd_projects', array());
  if (count($proj_arr) == 0) {
    return;
  }
  $projects = variable_get('globallink_pd_projectid');
  if (empty($projects)) {
    return;
  }
  $arr = explode(',', $projects);
  foreach ($arr as $value) {
    if (isset($proj_arr[$value])) {
      $proj_arr[$value] = $proj_arr[$value];
    }
    else {
      $proj_arr[$value] = $value;
    }
  }
  return $proj_arr;
}