From 6abc1b331df58d4fa9eedb2924871827759bf936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Ara=C3=B1a=20Cruz?= Date: Mon, 23 Mar 2015 21:08:30 +0000 Subject: [PATCH] Avoid overwrite of calculated update data with release info. Fixes #1157. --- lib/Drush/UpdateService/StatusInfoDrush.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/Drush/UpdateService/StatusInfoDrush.php b/lib/Drush/UpdateService/StatusInfoDrush.php index b4b7d51703..d10fbf1ff1 100644 --- a/lib/Drush/UpdateService/StatusInfoDrush.php +++ b/lib/Drush/UpdateService/StatusInfoDrush.php @@ -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; @@ -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; } @@ -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; } }