diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc old mode 100644 new mode 100755 index cf8f1ed..ecb8d6a --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -310,6 +310,11 @@ function install_begin_request(&$install_state) { require_once DRUPAL_ROOT . '/core/includes/lock.inc'; $conf['lock_backend'] = 'Drupal\Core\Lock\NullLockBackend'; + // Allow a passed in theme key so the installer can use a theme of choice. + if (isset($install_state['theme'])) { + $conf['maintenance_theme'] = $install_state['theme']; + } + // Prepare for themed output. We need to run this at the beginning of the // page request to avoid a different theme accidentally getting set. (We also // need to run it even in the case of command-line installations, to prevent @@ -574,16 +579,22 @@ function install_tasks($install_state) { // Determine whether translation import tasks will need to be performed. $needs_translations = count($install_state['translations']) > 1 && !empty($install_state['parameters']['langcode']) && $install_state['parameters']['langcode'] != 'en'; + // Determine whether we are hiding some options that can be pre-selected. + $multiple_profiles = count($install_state['profiles']) != 1; + $profile_preselected = isset($install_state['parameters']['profile']) && !empty($install_state['parameters']['profile']); + $language_preselected = isset($install_state['parameters']['langcode']) && !empty($install_state['parameters']['langcode']); + // Start with the core installation tasks that run before handing control // to the install profile. $tasks = array( 'install_select_language' => array( 'display_name' => st('Choose language'), + 'display' => !$language_preselected, 'run' => INSTALL_TASK_RUN_IF_REACHED, ), 'install_select_profile' => array( 'display_name' => st('Choose profile'), - 'display' => count($install_state['profiles']) != 1, + 'display' => $multiple_profiles && !$profile_preselected, 'run' => INSTALL_TASK_RUN_IF_REACHED, ), 'install_load_profile' => array( diff --git a/core/install.php b/core/install.php old mode 100644 new mode 100755 index 3ea85ff..70e2519 --- a/core/install.php +++ b/core/install.php @@ -31,6 +31,16 @@ if (version_compare(PHP_VERSION, '5.3.3') < 0) { exit; } +// Look for a distribution file. +if (is_file(DRUPAL_ROOT . '/profiles/distribution.php')) { + include(DRUPAL_ROOT . '/profiles/distribution.php'); +} + +// Make sure a $settings array exists. There may not have been one in the file. +if (!isset($settings)) { + $settings = array(); +} + // Start the installer. require_once DRUPAL_ROOT . '/core/includes/install.core.inc'; -install_drupal(); +install_drupal($settings); diff --git a/core/profiles/example.distribution.php b/core/profiles/example.distribution.php new file mode 100755 index 0000000..3803392 --- /dev/null +++ b/core/profiles/example.distribution.php @@ -0,0 +1,26 @@ + TRUE, + 'parameters' => array( + 'profile' =>'standard', + 'langcode' => 'en', + ), + 'theme' => 'stark', +); \ No newline at end of file