You are here

function globallink_save_project_names in GlobalLink Connect for Drupal 7.6

Same name and namespace in other branches
  1. 7.7 globallink_settings.inc \globallink_save_project_names()
  2. 7.5 globallink_settings.inc \globallink_save_project_names()

Saves project names.

1 call to globallink_save_project_names()
globallink_pd_settings_submit in ./globallink_settings.inc
Handles submission of globallink_pd_settings form.

File

./globallink_settings.inc, line 455

Code

function globallink_save_project_names() {
  $pd4 = globallink_get_project_director_details();
  $projects_arr = globallink_get_user_pd_projects($pd4);
  $project_short_code = $pd4->projectShortCode;
  $var_arr = array();
  if ($project_short_code != '') {
    $proj_code_arr = explode(',', $project_short_code);
    foreach ($proj_code_arr as $proj_code) {
      if (isset($projects_arr[$proj_code])) {
        $var_arr[$proj_code] = $projects_arr[$proj_code];
      }
    }
  }
  variable_set('globallink_pd_projects', $var_arr);
}