function _pm_get_update_info

6.x drupal.inc _pm_get_update_info($projects)
6.x drupal_6.inc _pm_get_update_info($projects)
3.x drupal_6.inc _pm_get_update_info($projects = NULL)
3.x drupal_7.inc _pm_get_update_info($projects = NULL)
3.x drupal_5.inc _pm_get_update_info($projects = NULL)
4.x drupal.inc _pm_get_update_info($projects)
4.x drupal_6.inc _pm_get_update_info($projects)
4.x drupal_5.inc _pm_get_update_info($projects)
5.x drupal.inc _pm_get_update_info($projects)
5.x drupal_6.inc _pm_get_update_info($projects)

Get update information for all installed projects.

Return value

An array containing remote and local versions for all installed projects

1 call to _pm_get_update_info()
drush_pm_updatecode in commands/pm/updatecode.pm.inc
Command callback. Displays update status info and allows to update installed projects. Pass specific projects as arguments, otherwise we update all that have candidate releases.

File

commands/pm/update_info/drupal_6.inc, line 54

Code

function _pm_get_update_info($projects) {
  // We force a refresh if the cache is not available.
  if (!cache_get('update_available_releases', 'cache_update')) {
    _pm_refresh();
  }

  $info = update_get_available(TRUE);

  // Force to invalidate some update_status caches that are only cleared
  // when visiting update status report page.
  _update_cache_clear('update_project_data');
  _update_cache_clear('update_project_projects');

  $data = update_calculate_project_data($info);
  foreach ($data as $project_name => $project) {
    // Discard custom projects.
    if ($project['status'] == UPDATE_UNKNOWN) {
      unset($data[$project_name]);
      continue;
    }
    if (in_array($project['project_type'], array('disabled-module', 'disabled-theme'))) {
      $data[$project_name]['project_type'] = substr($project['project_type'], strpos($project['project_type'], '-') + 1);
    }
    $data[$project_name]['includes'] = drupal_map_assoc($projects[$project_name]['extensions']);
  }
  $data = _pm_get_project_path($data, 'includes');

  return $data;
}