diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 5defe93..b49662d 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -1176,6 +1176,26 @@ function _install_select_profile($profiles) { elseif (!empty($_POST['profile']) && isset($profiles[$_POST['profile']])) { return $profiles[$_POST['profile']]->name; } + else { + // Check for a profile marked "exclusive" and ensure that only one profile + // is marked as such. + $exclusive_profile = NULL; + foreach ($profiles as $profile) { + $profile_info = install_profile_info($profile->name); + if (!empty($profile_info['exclusive'])) { + if (empty($exclusive_profile)) { + $exclusive_profile = $profile->name; + } + else { + // We found more than one profile with an "exclusive" property. + // There's no way to choose between them, so we ignore the property + // altogether. + return; + } + } + } + return $exclusive_profile; + } } /** diff --git a/core/includes/install.inc b/core/includes/install.inc index 330fc0e..4079418 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -883,6 +883,10 @@ function drupal_check_module($module) { * - distribution_name: The name of the Drupal distribution that is being * installed, to be shown throughout the installation process. Defaults to * 'Drupal'. + * - exclusive: If the install profile is intended to be the only eligible + * choice in a distribution, setting exclusive = TRUE will auto-select it + * during installation, and the install profile selection screen will be + * skipped. * * Note that this function does an expensive file system scan to get info file * information for dependencies. If you only need information from the info