Commit 75e84734 authored by Dries's avatar Dries
Browse files

- Patch #585012 by jpmckinney, David_Rothstein: setting a default theme in...

- Patch #585012 by jpmckinney, David_Rothstein: setting a default theme in install profile causes WHACK errors.
parent ada6432e
......@@ -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']);
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment