install_change_settings

Versions
5 – 6
install_change_settings($profile = 'default', $install_locale = '')

Configure and rewrite settings.php.

▾ 1 function calls 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...

Code

./install.php, line 182

<?php
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
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.