_db_check_install_needed

Definition

_db_check_install_needed()
drupal/includes/database/database.inc, line 2812

Description

Redirects the user to the installation script.

This will check if Drupal has not been installed yet (i.e., if no $databases array has been defined in the settings.php file) and we are not already installing. If both are true, the user is redirected to install.php.

Related topics

Namesort iconDescription
Database abstraction layerAllow the use of different database servers using the same code base.

Code

function _db_check_install_needed() {
  global $databases;
  if (empty($databases) && !drupal_installation_attempted()) {
    include_once DRUPAL_ROOT . '/includes/install.inc';
    install_goto('install.php');
  }
}