function update_progress_page_nojs in Drupal 4
Same name and namespace in other branches
- 5 update.php \update_progress_page_nojs()
Perform updates for the non-JS version and return the status page.
1 call to update_progress_page_nojs()
File
- ./
update.php, line 452 - Administrative page for handling updates from one Drupal version to another.
Code
function update_progress_page_nojs() {
drupal_set_title('Updating');
$new_op = 'do_update_nojs';
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
// Error handling: if PHP dies, it will output whatever is in the output
// buffer, followed by the error message.
ob_start();
$fallback = '<p class="error">An unrecoverable error has occurred. You can find the error message below. It is advised to copy it to the clipboard for reference. Please continue to the <a href="update.php?op=error">update summary</a>.</p><p class="error">';
print theme('maintenance_page', $fallback, FALSE, TRUE);
list($percentage, $message) = update_do_updates();
if ($percentage == 100) {
$new_op = 'finished';
}
// Updates successful; remove fallback
ob_end_clean();
}
else {
// This is the first page so return some output immediately.
$percentage = 0;
$message = 'Starting updates';
}
drupal_set_html_head('<meta http-equiv="Refresh" content="0; URL=update.php?op=' . $new_op . '">');
$output = theme('progress_bar', $percentage, $message);
$output .= '<p>Updating your site will take a few seconds.</p>';
// Note: do not output drupal_set_message()s until the summary page.
print theme('maintenance_page', $output, FALSE);
return NULL;
}