function drush_core_config_load

8.0.x core.drush.inc drush_core_config_load($headers = TRUE)
6.x core.drush.inc drush_core_config_load($headers = TRUE)
7.x core.drush.inc drush_core_config_load($headers = TRUE)
5.x core.drush.inc drush_core_config_load($headers = TRUE)
master core.drush.inc drush_core_config_load($headers = TRUE)
2 calls to drush_core_config_load()
core_core_config_complete in commands/core/core.drush.inc
Command argument complete callback.
drush_core_config in commands/core/core.drush.inc
Command callback. Edit drushrc and alias files.

File

commands/core/core.drush.inc, line 712
Core drush commands.

Code

function drush_core_config_load($headers = TRUE) {
  $php_header = $php = $rcs_header = $rcs = $aliases_header = $aliases = $drupal_header = $drupal = array();
  $php = _drush_core_config_php_ini_files();
  if (!empty($php)) {
    if ($headers) {
      $php_header = array('phpini' => '-- PHP ini files --');
    }
  }

  $bash = _drush_core_config_bash_files();
  if (!empty($bash)) {
    if ($headers) {
      $bash_header = array('bash' => '-- Bash files --');
    }
  }

  drush_sitealias_load_all();
  if ($rcs = drush_get_context_options('context-path', TRUE)) {
    if ($headers) {
      $rcs_header = array('drushrc' => '-- Drushrc --');
    }
  }
  if ($aliases = drush_get_context('drush-alias-files')) {
    if ($headers) {
      $aliases_header = array('aliases' => '-- Aliases --');
    }
  }
  if ($site_root = drush_get_context('DRUSH_DRUPAL_SITE_ROOT')) {
    $drupal[] = realpath($site_root . '/settings.php');
    if (file_exists($site_root . '/settings.local.php')) {
      $drupal[] = realpath($site_root . '/settings.local.php');
    }
    $drupal[] = realpath(DRUPAL_ROOT . '/.htaccess');
    if ($headers) {
      $drupal_header = array('drupal' => '-- Drupal --');
    }
  }
  return array_merge($php_header, $php, $bash_header, $bash, $rcs_header, $rcs, $aliases_header, $aliases, $drupal_header, $drupal);
}