All pastes #86408 Raw Edit

Miscellany

public php v1 · immutable
·published 2006-07-12 20:52 UTC
rendered paste body
<?phpfunction 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);      }    }  }  // Keep track of total number of updates  $_SESSION['update_total'] = count($_SESSION['update_remaining']);  if ($_POST['edit']['has_js']) {    return update_progress_page();  }  else {    return update_progress_page_nojs();  }}