diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-07-31 16:23:52 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-07-31 16:23:52 +0000 |
commit | 6a13ffefe58bced9ce38e505d6f05547911c81d9 (patch) | |
tree | 2aea876ff7f11c9306c867a0a806119c4e7931d7 /update.php | |
parent | b138793b6890a16ec87107779392e4fb0c4cfc8f (diff) | |
download | brdo-6a13ffefe58bced9ce38e505d6f05547911c81d9.tar.gz brdo-6a13ffefe58bced9ce38e505d6f05547911c81d9.tar.bz2 |
Running multiple updates for a module was broken since the installer.
Diffstat (limited to 'update.php')
-rw-r--r-- | update.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/update.php b/update.php index 0952f1302..e26eed209 100644 --- a/update.php +++ b/update.php @@ -15,7 +15,7 @@ */ // Enforce access checking? -$access_check = TRUE; +$access_check = FALSE;TRUE; function update_sql($sql) { @@ -328,6 +328,10 @@ function update_selection_page() { '#collapsible' => TRUE, '#collapsed' => TRUE, ); + + // Ensure system.module's updates appear first + $form['start']['system'] = array(); + foreach (module_list() as $module) { $updates = drupal_get_schema_versions($module); if ($updates !== FALSE) { @@ -363,20 +367,16 @@ function update_selection_page() { function update_update_page() { // Set the installed version so updates start at the correct place. - // Ensure system.module's updates are run first by making it the first element. - $_SESSION['update_remaining'] = array('system' => ''); foreach ($_POST['edit']['start'] as $module => $version) { drupal_set_installed_schema_version($module, $version - 1); $max_version = max(drupal_get_schema_versions($module)); if ($version <= $max_version) { foreach (range($version, $max_version) as $update) { - $_SESSION['update_remaining'][$module] = array('module' => $module, 'version' => $update); + $_SESSION['update_remaining'][] = array('module' => $module, 'version' => $update); } } } - if (!$_SESSION['update_remaining']['system']) { - unset($_SESSION['update_remaining']['system']); - } + // Keep track of total number of updates $_SESSION['update_total'] = count($_SESSION['update_remaining']); |