$project) { 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; } /** * Get project information from drupal.org. * * @param $projects An array of project names */ function pm_get_project_info($projects) { $info = array(); $data = array(); foreach ($projects as $project_name => $project) { $url = UPDATE_DEFAULT_URL. "/$project_name/". drush_drupal_major_version() . '.x'; $xml = drupal_http_request($url); $data[] = $xml->data; } if ($data) { include_once drupal_get_path('module', 'update') .'/update.fetch.inc'; $parser = new update_xml_parser; $info = $parser->parse($data); } return $info; }