? files
? sites/localhost.c-drupal
Index: update.php
===================================================================
RCS file: /cvs/drupal/drupal/update.php,v
retrieving revision 1.196
diff -u -F^f -r1.196 update.php
--- update.php	31 Jul 2006 19:24:16 -0000	1.196
+++ update.php	5 Aug 2006 23:56:00 -0000
@@ -337,11 +337,18 @@ function update_selection_page() {
     if ($updates !== FALSE) {
       $updates = drupal_map_assoc($updates);
       $updates[] = 'No updates available';
+      $default = drupal_get_installed_schema_version($module);
+      foreach ($updates as $update) {
+        if ($update > $default) {
+          $default = $update;
+          break;
+        }
+      }
 
       $form['start'][$module] = array(
         '#type' => 'select',
         '#title' => $module . ' module',
-        '#default_value' => array_search(drupal_get_installed_schema_version($module), $updates) + 1,
+        '#default_value' => $default,
         '#options' => $updates,
       );
     }
@@ -369,10 +376,13 @@ function update_update_page() {
   // Set the installed version so updates start at the correct place.
   foreach ($_POST['edit']['start'] as $module => $version) {
     drupal_set_installed_schema_version($module, $version - 1);
-    $max_version = max(drupal_get_schema_versions($module));
+    $updates = drupal_get_schema_versions($module);
+    $max_version = max($updates);
     if ($version <= $max_version) {
-      foreach (range($version, $max_version) as $update) {
-        $_SESSION['update_remaining'][] = array('module' => $module, 'version' => $update);
+      foreach ($updates as $update) {
+        if ($update > $version) {
+          $_SESSION['update_remaining'][] = array('module' => $module, 'version' => $update);
+        }
       }
     }
   }
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.4
diff -u -F^f -r1.4 system.install
--- modules/system/system.install	4 Aug 2006 06:58:44 -0000	1.4
+++ modules/system/system.install	5 Aug 2006 23:56:04 -0000
@@ -2821,7 +2821,12 @@ function system_update_182() {
   return $ret;
 }
 
-function system_update_183() {
+/**
+ * @defgroup updates-4.7-to-x.x System updates from 4.7 to x.x
+ * @{
+ */
+
+function system_update_1000() {
   $ret = array();
   switch ($GLOBALS['db_type']) {
     case 'mysql':
@@ -2847,7 +2852,7 @@ function system_update_183() {
   return $ret;
 }
 
-function system_update_184() {
+function system_update_1001() {
   // change DB schema for better poll support
   $ret = array();
 
@@ -2866,7 +2871,7 @@ function system_update_184() {
   return $ret;
 }
 
-function system_update_185() {
+function system_update_1002() {
   // Make the forum's vocabulary the highest in list, if present
   $ret = array();
 
@@ -2877,7 +2882,7 @@ function system_update_185() {
   return $ret;
 }
 
-function system_update_186() {
+function system_update_1003() {
   // Make use of guid in feed items
   $ret = array();
   switch ($GLOBALS['db_type']) {
@@ -2893,7 +2898,7 @@ function system_update_186() {
 }
 
 
-function system_update_187() {
+function system_update_1004() {
   // Increase the size of bid in boxes and aid in access
   $ret = array();
   switch ($GLOBALS['db_type']) {
@@ -2908,3 +2913,8 @@ function system_update_187() {
   }
   return $ret;
 }
+
+/**
+ * @} End of "defgroup updates-4.7-to-x.x"
+ * The next series of updates should start at 2000.
+ */
