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_updatestatus in commands/pm/updatestatus.pm.inc
Command callback. Displays update status info of installed projects.

File

commands/pm/update_info/drupal_6.inc, line 83
Implementation of 'drupal' update_info engine for Drupal 6.

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.
  if (function_exists('_update_cache_clear')) {
    _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;
    }
    // Discard projects with unknown installation path.
    if ($project_name != 'drupal' && !isset($projects[$project_name]['path'])) {
      unset($data[$project_name]);
      continue;
    }
    // Allow to update disabled projects.
    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);
    }
    // Add some info from the project to $data.
    $data[$project_name] += array(
      'path' => isset($projects[$project_name]['path']) ? $projects[$project_name]['path'] : '',
      'label' => $projects[$project_name]['label'],
    );
  }

  return $data;
}