Commit c84a43d3 authored by alexpott's avatar alexpott

Issue #2176131 by sun: Database configuration form in installer still uses...

Issue #2176131 by sun: Database configuration form in installer still uses 'db_prefix' instead of 'prefix'.
parent ff0fdc46
......@@ -1173,13 +1173,6 @@ function install_settings_form_validate($form, &$form_state) {
$database['namespace'] = substr($install_namespace, 0, strrpos($install_namespace, '\\'));
$database['driver'] = $driver;
// @todo PIFR uses 'db_prefix' instead of 'prefix'. Remove this when it gets
// fixed.
if (!$test_prefix) {
$database['prefix'] = $database['db_prefix'];
}
unset($database['db_prefix']);
$form_state['storage']['database'] = $database;
$errors = install_database_errors($database, $form_state['values']['settings_file']);
foreach ($errors as $name => $message) {
......
......@@ -253,7 +253,7 @@ public function getFormOptions(array $database) {
$profile = drupal_get_profile();
$db_prefix = ($profile == 'standard') ? 'drupal_' : $profile . '_';
$form['advanced_options']['db_prefix'] = array(
$form['advanced_options']['prefix'] = array(
'#type' => 'textfield',
'#title' => t('Table name prefix'),
'#default_value' => '',
......
......@@ -827,6 +827,11 @@ protected function setUp() {
*/
protected function installParameters() {
$connection_info = Database::getConnectionInfo();
$driver = $connection_info['default']['driver'];
unset($connection_info['default']['driver']);
unset($connection_info['default']['namespace']);
unset($connection_info['default']['pdo']);
unset($connection_info['default']['init_commands']);
$parameters = array(
'interactive' => FALSE,
'parameters' => array(
......@@ -834,7 +839,10 @@ protected function installParameters() {
'langcode' => 'en',
),
'forms' => array(
'install_settings_form' => $connection_info['default'],
'install_settings_form' => array(
'driver' => $driver,
$driver => $connection_info['default'],
),
'install_configure_form' => array(
'site_name' => 'Drupal',
'site_mail' => 'simpletest@example.com',
......
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