install.php | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git install.php install.php index ae37dea..223b85d 100644 --- install.php +++ install.php @@ -40,6 +40,14 @@ function install_main() { drupal_load('module', 'system'); drupal_load('module', 'filter'); + // Install profile chosen, set the global immediatly + // + // this needs to be done before the theme cache gets initialized in + // drupal_maintenance_theme() + if (!empty($_GET['profile'])) { + $profile = preg_replace('/[^a-zA-Z_0-9]/', '', $_GET['profile']); + } + // Set up theme system for the maintenance page. drupal_maintenance_theme(); @@ -74,15 +82,14 @@ function install_main() { $task = NULL; } - // Decide which profile to use. - if (!empty($_GET['profile'])) { - $profile = preg_replace('/[^a-zA-Z_0-9]/', '', $_GET['profile']); - } - elseif ($profile = install_select_profile()) { - install_goto("install.php?profile=$profile"); - } - else { - install_no_profile_error(); + // No profile was passed in GET, ask the user. + if (empty($profile)) { + if ($profile = install_select_profile()) { + install_goto("install.php?profile=$profile"); + } + else { + install_no_profile_error(); + } } // Load the profile.