You are here

function update_do_update_page in Drupal 4

Same name and namespace in other branches
  1. 5 update.php \update_do_update_page()

Perform updates for the JS version and return progress.

1 call to update_do_update_page()
update.php in ./update.php
Administrative page for handling updates from one Drupal version to another.

File

./update.php, line 433
Administrative page for handling updates from one Drupal version to another.

Code

function update_do_update_page() {
  global $conf;

  // HTTP Post required
  if ($_SERVER['REQUEST_METHOD'] != 'POST') {
    drupal_set_message('HTTP Post is required.', 'error');
    drupal_set_title('Error');
    return '';
  }

  // Error handling: if PHP dies, the output will fail to parse as JSON, and
  // the Javascript will tell the user to continue to the op=error page.
  list($percentage, $message) = update_do_updates();
  print drupal_to_js(array(
    'status' => TRUE,
    'percentage' => $percentage,
    'message' => $message,
  ));
}