install_complete

5 install.php install_complete($profile)

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

1 call to install_complete()

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);
}
Login or register to post comments