From 75e847346df726ddedf789e0f5cbb813cb21e947 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 29 May 2010 08:02:58 +0000 Subject: - Patch #585012 by jpmckinney, David_Rothstein: setting a default theme in install profile causes WHACK errors. --- includes/install.core.inc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'includes/install.core.inc') diff --git a/includes/install.core.inc b/includes/install.core.inc index dd376ae9c..0e4cefe46 100644 --- a/includes/install.core.inc +++ b/includes/install.core.inc @@ -211,6 +211,17 @@ function install_state_defaults() { * modified with information gleaned from the beginning of the page request. */ function install_begin_request(&$install_state) { + // Add any installation parameters passed in via the URL. + $install_state['parameters'] += $_GET; + + // Validate certain core settings that are used throughout the installation. + if (!empty($install_state['parameters']['profile'])) { + $install_state['parameters']['profile'] = preg_replace('/[^a-zA-Z_0-9]/', '', $install_state['parameters']['profile']); + } + if (!empty($install_state['parameters']['locale'])) { + $install_state['parameters']['locale'] = preg_replace('/[^a-zA-Z_0-9\-]/', '', $install_state['parameters']['locale']); + } + // Allow command line scripts to override server variables used by Drupal. require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; if (!$install_state['interactive']) { @@ -299,17 +310,6 @@ function install_begin_request(&$install_state) { // Modify the installation state as appropriate. $install_state['completed_task'] = $task; $install_state['database_tables_exist'] = !empty($task); - - // Add any installation parameters passed in via the URL. - $install_state['parameters'] += $_GET; - - // Validate certain core settings that are used throughout the installation. - if (!empty($install_state['parameters']['profile'])) { - $install_state['parameters']['profile'] = preg_replace('/[^a-zA-Z_0-9]/', '', $install_state['parameters']['profile']); - } - if (!empty($install_state['parameters']['locale'])) { - $install_state['parameters']['locale'] = preg_replace('/[^a-zA-Z_0-9\-]/', '', $install_state['parameters']['locale']); - } } /** -- cgit v1.2.3