summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-27 19:42:56 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-27 19:42:56 +0000
commit1aec298314454b67fbc18738c3ffa6f12a14dd59 (patch)
treebd84dbcdf3593e276d6d3c352feff460be716762 /install.php
parenta7e7c0a9e73f71f8de0db084e194647237fab298 (diff)
downloadbrdo-1aec298314454b67fbc18738c3ffa6f12a14dd59.tar.gz
brdo-1aec298314454b67fbc18738c3ffa6f12a14dd59.tar.bz2
- Patch #349508 by Josh Waihi: make sure that the database is installed using UTF-8 on PostgreSQL.
Diffstat (limited to 'install.php')
-rw-r--r--install.php19
1 files changed, 8 insertions, 11 deletions
diff --git a/install.php b/install.php
index ce0b3c6dc..c9babe4d9 100644
--- a/install.php
+++ b/install.php
@@ -336,7 +336,6 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
* Form API validate for install_settings form.
*/
function install_settings_form_validate($form, &$form_state) {
- global $db_url;
_install_settings_form_validate($form_state['values'], $form_state['values']['settings_file'], $form_state, $form);
}
@@ -364,17 +363,15 @@ function _install_settings_form_validate($database, $settings_file, &$form_state
if (isset($form)) {
form_set_value($form['_database'], $database, $form_state);
}
- $class = "DatabaseInstaller_$driver";
- $test = new $class;
+
+ // Run tasks associated with the database type. Any errors are caught in the
+ // calling function
$databases['default']['default'] = $database;
- $return = $test->test();
- if (!$return || $test->error) {
- if (!empty($test->success)) {
- form_set_error('db_type', st('In order for Drupal to work, and to continue with the installation process, you must resolve all permission issues reported above. We were able to verify that we have permission for the following commands: %commands. For more help with configuring your database server, see the <a href="http://drupal.org/node/258">Installation and upgrading handbook</a>. If you are unsure what any of this means you should probably contact your hosting provider.', array('%commands' => implode($test->success, ', '))));
- }
- else {
- form_set_error('driver', '');
- }
+ try {
+ db_run_tasks($database['driver']);
+ }
+ catch (DatabaseTaskException $e) {
+ form_set_error('db_type', $e->getMessage());
}
}
}