diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-10 05:43:06 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-10 05:43:06 +0000 |
commit | 00e38fb0e313fc732dce1b7bc9125340519d5155 (patch) | |
tree | 7f63eaa5aee46755f008c6e1e7e4de7817267e8d /install.php | |
parent | 00bc1ccb8b1e1f984e50519ea26e6552e4593b71 (diff) | |
download | brdo-00e38fb0e313fc732dce1b7bc9125340519d5155.tar.gz brdo-00e38fb0e313fc732dce1b7bc9125340519d5155.tar.bz2 |
#355496 by geodaniel, Dave Reid: Always list available databases, with explanation when only one is in the list.
Diffstat (limited to 'install.php')
-rw-r--r-- | install.php | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/install.php b/install.php index 939f64046..bd31efdc0 100644 --- a/install.php +++ b/install.php @@ -235,23 +235,17 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting '#description' => '<p>' . st('To set up your @drupal database, enter the following information.', array('@drupal' => drupal_install_profile_name())) . '</p>', ); + $form['basic_options']['driver'] = array( + '#type' => 'radios', + '#title' => st('Database type'), + '#required' => TRUE, + '#options' => $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())), + ); if (count($drivers) == 1) { - $form['basic_options']['driver'] = array( - '#type' => 'hidden', - '#value' => current(array_keys($drivers)), - ); - $database_description = st('The name of the %driver database your @drupal data will be stored in. It must exist on your server before @drupal can be installed.', array('%driver' => current($drivers), '@drupal' => drupal_install_profile_name())); - } - else { - $form['basic_options']['driver'] = array( - '#type' => 'radios', - '#title' => st('Database type'), - '#required' => TRUE, - '#options' => $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())); + $form['basic_options']['driver']['#disabled'] = TRUE; + $form['basic_options']['driver']['#description'] .= ' ' . st('Your PHP configuration only supports the %driver database type so it has been automatically selected.', array('%driver' => current($drivers))); } // Database name @@ -262,7 +256,7 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting '#size' => 45, '#maxlength' => 45, '#required' => TRUE, - '#description' => $database_description, + '#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())), ); // Database username |