function DrupalBoot::bootstrap_drupal_site_validate_settings_present

8.0.x DrupalBoot.php DrupalBoot::bootstrap_drupal_site_validate_settings_present()
7.x DrupalBoot.php DrupalBoot::bootstrap_drupal_site_validate_settings_present()
master DrupalBoot.php DrupalBoot::bootstrap_drupal_site_validate_settings_present()

Validate that the Drupal site has all of the settings that it needs to operated.

1 call to DrupalBoot::bootstrap_drupal_site_validate_settings_present()

File

lib/Drush/Boot/DrupalBoot.php, line 389

Namespace

Drush\Boot

Class

DrupalBoot

Code

function bootstrap_drupal_site_validate_settings_present() {
  $site = drush_bootstrap_value('site', $_SERVER['HTTP_HOST']);

  $conf_path = drush_bootstrap_value('conf_path', $this->conf_path(TRUE, TRUE));
  $conf_file = "$conf_path/settings.php";
  if (!file_exists($conf_file)) {
    return drush_bootstrap_error('DRUPAL_SITE_SETTINGS_NOT_FOUND', dt("Could not find a Drupal settings.php file at !file.", array('!file' => $conf_file)));
  }

  return TRUE;
}