You are here

function install_select_profile in Drupal 5

Same name and namespace in other branches
  1. 8 core/includes/install.core.inc \install_select_profile()
  2. 6 install.php \install_select_profile()
  3. 7 includes/install.core.inc \install_select_profile()
  4. 9 core/includes/install.core.inc \install_select_profile()
  5. 10 core/includes/install.core.inc \install_select_profile()

Find all .profile files and allow admin to select which to install.

Return value

The selected profile.

1 call to install_select_profile()
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 388

Code

function install_select_profile() {
  include_once './includes/form.inc';
  $profiles = file_scan_directory('./profiles', '\\.profile$', array(
    '.',
    '..',
    'CVS',
  ), 0, TRUE, 'name', 0);

  // Don't need to choose profile if only one available.
  if (sizeof($profiles) == 1) {
    $profile = array_pop($profiles);
    require_once $profile->filename;
    return $profile->name;
  }
  elseif (sizeof($profiles) > 1) {
    foreach ($profiles as $profile) {
      if ($_POST['profile'] == $profile->name) {
        return $profile->name;
      }
    }
    drupal_maintenance_theme();
    drupal_set_title(st('Select an installation profile'));
    print theme('install_page', drupal_get_form('install_select_profile_form', $profiles));
    exit;
  }
}