function _drush_pm_download_releases_choice

4.x pm.drush.inc _drush_pm_download_releases_choice($xml, $project, $all = FALSE, $dev = FALSE)

Return an array of available releases for given project(s).

Helper function for pm-download.

1 call to _drush_pm_download_releases_choice()

File

commands/pm/pm.drush.inc, line 1378
The drush Project Manager

Code

function _drush_pm_download_releases_choice($xml, $project, $all = FALSE, $dev = FALSE) {
  $project_info = _drush_pm_get_releases_from_xml($xml, $project);
  $releases = _drush_pm_filter_releases($project_info['releases'], $all, $dev);

  $options = array();
  foreach ($releases as $version => $release) {
    $options[$version] = array(
      $version,
      '-',
      gmdate('Y-M-d', $release['date']),
      '-',
      implode(', ', $release['release_status']),
    );
  }
  return $options;
}