function _core_site_status_table

8.0.x core.drush.inc _core_site_status_table($project = '')
6.x core.drush.inc _core_site_status_table($project = '')
7.x core.drush.inc _core_site_status_table($project = '')
3.x core.drush.inc _core_site_status_table($project = '')
4.x core.drush.inc _core_site_status_table($project = '')
5.x core.drush.inc _core_site_status_table($project = '', $full = FALSE)
master core.drush.inc _core_site_status_table($project = '')
3 calls to _core_site_status_table()
drush_core_status in commands/core/core.drush.inc
Command callback. Provides a birds-eye view of the current Drupal installation.
drush_sitealias_resolve_path_references in includes/sitealias.inc
If there are any path aliases (items beginning with "%") in the test string, then resolve them as path aliases and add them to the provided alias record.
_core_site_credentials in commands/core/core.drush.inc

File

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

Code

function _core_site_status_table($project = '') {
  $phase = drush_get_context('DRUSH_BOOTSTRAP_PHASE');
  if ($drupal_root = drush_get_context('DRUSH_DRUPAL_ROOT')) {
    $status_table['drupal-version'] = drush_drupal_version();
    if ($site_root = drush_get_context('DRUSH_DRUPAL_SITE_ROOT')) {
      $status_table['uri'] = drush_get_context('DRUSH_URI');
      if ($creds = drush_get_context('DRUSH_DB_CREDENTIALS')) {
        $status_table['db-driver'] = $creds['driver'];
        if (!empty($creds['unix_socket'])) {
          $status_table['db-socket'] = $creds['unix_socket'];
        }
        else {
          $status_table['db-hostname'] = $creds['host'];
        }
        $status_table['db-username'] = $creds['user'];
        $status_table['db-name'] = $creds['name'];
        $status_table['db-password'] = $creds['pass'];
        if ($phase > DRUSH_BOOTSTRAP_DRUPAL_DATABASE) {
          $status_table['db-status'] = dt('Connected');
          if ($phase > DRUSH_BOOTSTRAP_DRUPAL_FULL) {
            $status_table['bootstrap'] = dt('Successful');
            if ($phase == DRUSH_BOOTSTRAP_DRUPAL_LOGIN) {
              global $user;
              $username = ($user->uid) ? $user->name : dt('Anonymous');
              $status_table['user'] = $username;
            }
          }
        }
      }
    }
    $status_table['theme'] = drush_theme_get_default();
    $status_table['admin-theme'] = drush_theme_get_admin();
  }
  if ($php_bin = drush_get_option('php')) {
    $status_table['php-bin'] = $php_bin;
  }
  $status_table['php-os'] = PHP_OS;
  if ($php_ini_files = _drush_core_config_php_ini_files()) {
    $status_table['php-conf'] = $php_ini_files;
  }
  $status_table['drush-version'] = DRUSH_VERSION;
  $status_table['drush-conf'] = drush_flatten_array(drush_get_context_options('context-path', ''));
  $alias_files = _drush_sitealias_find_alias_files();
  $status_table['drush-alias-files'] = $alias_files;

  $paths = _core_path_aliases($project);
  if (!empty($paths)) {
    foreach ($paths as $target => $one_path) {
      $name = $target;
      if (substr($name, 0, 1) == '%') {
        $name = substr($name, 1);
      }
      $status_table[$name] = $one_path;
    }
  }

  // Store the paths into the '%paths' index; this will be
  // used by other code, but will not be included in the output
  // of the drush status command.
  $status_table['%paths'] = $paths;

  return $status_table;
}