function update_update_page() { // Set the installed version so updates start at the correct place. $_SESSION['update_remaining'][] = array('module' => 'versioncontrol_project', 'version' => 1); $_SESSION['update_remaining'][] = array('module' => 'versioncontrol_project', 'version' => 2); // Keep track of total number of updates if (isset($_SESSION['update_remaining'])) { $_SESSION['update_total'] = count($_SESSION['update_remaining']); } if ($_POST['has_js']) { return update_progress_page(); } else { return update_progress_page_nojs(); } }
function update_update_page() { // Set the installed version so updates start at the correct place. foreach ($_POST['start'] as $module => $version) { drupal_set_installed_schema_version($module, $version - 1); $updates = drupal_get_schema_versions($module); $max_version = max($updates); if ($version <= $max_version) { foreach ($updates as $update) { if ($update >= $version) { $_SESSION['update_remaining'][] = array('module' => $module, 'version' => $update); } } } } // Keep track of total number of updates $_SESSION['update_total'] = count($_SESSION['update_remaining']); if ($_POST['has_js']) { return update_progress_page(); } else { return update_progress_page_nojs(); } }