function update_update_page in Drupal 5
Same name and namespace in other branches
- 4 update.php \update_update_page()
1 call to update_update_page()
- update.php in ./
update.php - Administrative page for handling updates from one Drupal version to another.
File
- ./
update.php, line 377 - Administrative page for handling updates from one Drupal version to another.
Code
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
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();
}
}