install_change_settings

5 install.php install_change_settings($profile = 'default', $install_locale = '')
6 install.php install_change_settings($profile = 'default', $install_locale = '')

Configure and rewrite settings.php.

1 call to install_change_settings()

File

./install.php, line 194

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;
}
Login or register to post comments