You are here

function install_complete in Drupal 5

Page displayed when the installation is complete. Called from install.php.

1 call to install_complete()
install_main in ./install.php
The Drupal installation happens in a series of steps. We begin by verifying that the current environment meets our minimum requirements. We then go on to verify that settings.php is properly configured. From there we connect to the configured database…

File

./install.php, line 533

Code

function install_complete($profile) {
  global $base_url;
  $output = '';

  // Store install profile for later use.
  variable_set('install_profile', $profile);

  // Bootstrap newly installed Drupal, while preserving existing messages.
  $messages = $_SESSION['messages'];
  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  $_SESSION['messages'] = $messages;

  // Build final page.
  drupal_maintenance_theme();
  drupal_set_title(st('@drupal installation complete', array(
    '@drupal' => drupal_install_profile_name(),
  )));
  $output .= '<p>' . st('Congratulations, @drupal has been successfully installed.', array(
    '@drupal' => drupal_install_profile_name(),
  )) . '</p>';

  // Show profile finalization info.
  $function = $profile . '_profile_final';
  if (function_exists($function)) {

    // More steps required
    $profile_message = $function();
  }

  // If the profile returned a welcome message, use that instead of default.
  if (isset($profile_message)) {
    $output .= $profile_message;
  }
  else {

    // No more steps
    $output .= '<p>' . (drupal_set_message() ? st('Please review the messages above before continuing on to <a href="@url">your new site</a>.', array(
      '@url' => url(''),
    )) : st('You may now visit <a href="@url">your new site</a>.', array(
      '@url' => url(''),
    ))) . '</p>';
  }

  // Output page.
  print theme('maintenance_page', $output);
}