Skip to content

Commit

Permalink
Merge pull request #1278 from jonhattan/ups-fixes
Browse files Browse the repository at this point in the history
Avoid overwrite of calculated update data with release info. Fixes #1157
  • Loading branch information
jonhattan committed Mar 23, 2015
2 parents f1b75d0 + 6abc1b3 commit a3e54b8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/Drush/UpdateService/StatusInfoDrush.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ private function calculateUpdateStatus($available, $projects) {
$this->calculateProjectUpdateStatus($project_release_info, $project_update_info);
}

$update_info[$project_name] = $project_release_info->getInfo() + $project_update_info;
// We want to ship all release info data including all releases,
// not just the ones selected by calculateProjectUpdateStatus().
// We use it to allow the user to update to a specific version.
unset($project_update_info['releases']);
$update_info[$project_name] = $project_update_info + $project_release_info->getInfo();
}

return $update_info;
Expand Down Expand Up @@ -274,7 +278,7 @@ private function calculateProjectUpdateStatus($project_release_info, &$project_d
}

// See if this is a higher major version than our target and discard it.
// Note: at this poont Drupal record it as an "Also available" release.
// Note: at this point Drupal record it as an "Also available" release.
if (isset($release['version_major']) && $release['version_major'] > $target_major) {
continue;
}
Expand Down Expand Up @@ -335,7 +339,7 @@ private function calculateProjectUpdateStatus($project_release_info, &$project_d

// See if this release is a security update.
if (isset($release['terms']['Release type'])
&& in_array('Security update', $release['terms']['Release type'])) {
&& in_array('Security update', $release['terms']['Release type'])) {
$project_data['security updates'][] = $release;
}
}
Expand Down

0 comments on commit a3e54b8

Please sign in to comment.