function pm_get_project_info

3.x drupal_6.inc pm_get_project_info($projects)
3.x drupal_7.inc pm_get_project_info($projects)
3.x drupal_5.inc pm_get_project_info($projects)
4.x drupal.inc pm_get_project_info($projects)
4.x drupal_6.inc pm_get_project_info($projects)
4.x drupal_5.inc pm_get_project_info($projects)

File

commands/pm/update_info/drupal.inc, line 124

Code

function pm_get_project_info($projects) {
  $data = array();
  include_once drupal_get_path('module', 'update') . '/update.fetch.inc';

  foreach ($projects as $project_name => $project) {
    $url = UPDATE_DEFAULT_URL . "/$project_name/" . drush_drupal_major_version() . '.x';
    $xml = drupal_http_request($url);
    if (isset($xml->error)) {
      drush_set_error(dt('HTTP Request to @request has failed. @error', array('@request' => $xml->request, '@error' => $xml->error)));
    }
    elseif (!$info = update_parse_xml($xml->data)) {
      drush_set_error(dt('No release history found for @project_name', array('@project_name' => $project_name)));
    }
    else {
      $data[$project_name] = $info;
    }
  }
  return $data;
}