function install_change_settings in Drupal 6
Same name and namespace in other branches
- 5 install.php \install_change_settings()
Configure and rewrite settings.php.
1 call to install_change_settings()
- install_main in ./
install.php - The Drupal installation happens in a series of steps. We begin by verifying that the current environment meets our minimum requirements. We then go on to verify that settings.php is properly configured. From there we connect to the configured database…
File
- ./
install.php, line 204
Code
function install_change_settings($profile = 'default', $install_locale = '') {
global $db_url, $db_type, $db_prefix;
$url = parse_url(is_array($db_url) ? $db_url['default'] : $db_url);
$db_user = isset($url['user']) ? urldecode($url['user']) : '';
$db_pass = isset($url['pass']) ? urldecode($url['pass']) : '';
$db_host = isset($url['host']) ? urldecode($url['host']) : '';
$db_port = isset($url['port']) ? urldecode($url['port']) : '';
$db_path = ltrim(urldecode($url['path']), '/');
$conf_path = './' . conf_path(FALSE, TRUE);
$settings_file = $conf_path . '/settings.php';
// We always need this because we want to run form_get_errors.
include_once './includes/form.inc';
install_task_list('database');
$output = drupal_get_form('install_settings_form', $profile, $install_locale, $settings_file, $db_url, $db_type, $db_prefix, $db_user, $db_pass, $db_host, $db_port, $db_path);
drupal_set_title(st('Database configuration'));
print theme('install_page', $output);
exit;
}