diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 9b0ef4c..b9f0c53 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -1302,7 +1302,20 @@ function install_settings_form_submit($form, &$form_state) { function install_select_profile(&$install_state) { if (empty($install_state['parameters']['profile'])) { // Try to find a profile. - $profile = _install_select_profile($install_state['profiles']); + $profiles = $install_state['profiles']; + foreach ($profiles as $key => $profile) { + $details = install_profile_info($profile->name); + // Remove hidden profiles (such as the testing profile, which only exists + // to speed up test runs) from the list. This prevents them from being + // displayed in the user interface, and also means that if there is only + // one non-hidden profile, _install_select_profile() will choose it + // automatically. + if (!empty($details['hidden'])) { + unset($profiles[$key]); + } + } + $profile = _install_select_profile($profiles); + $install_state['profiles'] = $profiles; if (empty($profile)) { // We still don't have a profile, so display a form for selecting one. // Only do this in the case of interactive installations, since this is @@ -1388,11 +1401,6 @@ function install_select_profile_form($form, &$form_state, $install_state) { if (!isset($details['type']) || $details['type'] != 'profile') { continue; } - // Don't show hidden profiles. This is used by to hide the testing profile, - // which only exists to speed up test runs. - if ($details['hidden'] === TRUE) { - continue; - } $profiles[$profile->name] = $details; // Determine the name of the profile; default to file name if defined name