diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc old mode 100644 new mode 100755 index 32c0b49..6e2cc67 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -423,6 +423,11 @@ function install_begin_request(&$install_state) { require_once __DIR__ . '/cache.inc'; + // 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 @@ -694,11 +699,17 @@ function install_tasks($install_state) { // is selected, but no translation is yet in the translations directory. $needs_download = isset($install_state['parameters']['langcode']) && !isset($install_state['translations'][$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 installation profile. $tasks = array( 'install_select_language' => array( 'display_name' => st('Choose language'), + 'display' => !$language_preselected, 'run' => INSTALL_TASK_RUN_IF_REACHED, ), 'install_download_translation' => array( @@ -706,7 +717,7 @@ function install_tasks($install_state) { ), '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 1b921d6..15764a8 --- a/core/install.php +++ b/core/install.php @@ -26,6 +26,15 @@ 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 __DIR__ . '/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