Commit 39519985 authored by Dries's avatar Dries
Browse files

- Patch #299330 by justinrandell, Damien Tournoud: select MySQL driver by default -- less clicking

parent 762ca25e
......@@ -227,6 +227,13 @@ function drupal_detect_database_types() {
}
}
// Usability: unconditionnally put the MySQL driver on top.
if (isset($databases['mysql'])) {
$mysql_database = $databases['mysql'];
unset($databases['mysql']);
$databases = array('mysql' => $mysql_database) + $databases;
}
return $databases;
}
......
......@@ -194,7 +194,8 @@ function install_change_settings($profile = 'default', $install_locale = '') {
$conf_path = './' . conf_path(FALSE, TRUE);
$settings_file = $conf_path . '/settings.php';
$database = $databases['default']['default'];
$database = isset($databases['default']['default']) ? $databases['default']['default'] : array();
// We always need this because we want to run form_get_errors.
include_once './includes/form.inc';
install_task_list('database');
......@@ -237,7 +238,7 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
'#title' => st('Database driver'),
'#required' => TRUE,
'#options' => $drivers,
'#default_value' => !empty($database['driver']) ? $database['driver'] : current($drivers),
'#default_value' => !empty($database['driver']) ? $database['driver'] : current(array_keys($drivers)),
'#description' => st('The type of database your @drupal data will be stored in.', array('@drupal' => drupal_install_profile_name())),
);
$database_description = st('The name of the database your @drupal data will be stored in. It must exist on your server before @drupal can be installed.', array('@drupal' => drupal_install_profile_name()));
......
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