function _drush_sitealias_add_static_defaults

8.0.x _drush_sitealias_add_static_defaults(&$alias_record)
6.x _drush_sitealias_add_static_defaults(&$alias_record)
7.x _drush_sitealias_add_static_defaults(&$alias_record)
3.x _drush_sitealias_add_static_defaults(&$alias_record)
4.x _drush_sitealias_add_static_defaults(&$alias_record)
5.x _drush_sitealias_add_static_defaults(&$alias_record)
master _drush_sitealias_add_static_defaults(&$alias_record)

Add "static" default values to the given alias record. The difference between a static default and a transient default is that static defaults -always- exist in the alias record, and they are cached, whereas transient defaults are only added if the given drush command explicitly adds them.


alias_record: An alias record with most values already filled in

2 calls to _drush_sitealias_add_static_defaults()
_drush_sitealias_get_record in includes/
This is a continuation of drush_sitealias_get_record, above. It is not intended to be called directly.
_drush_sitealias_prepare_record in commands/core/
Given a site alias name, print out a php-syntax representation of it.


includes/, line 1196
The site alias API.


function _drush_sitealias_add_static_defaults(&$alias_record) {
  // If there is a 'db-url' entry but not 'databases' entry, then we will
  // build 'databases' from 'db-url' so that drush commands that use aliases
  // can always count on using a uniform 'databases' array.
  if (isset($alias_record['db-url']) && !isset($alias_record['databases'])) {
    $alias_record['databases'] = drush_sitealias_convert_db_from_db_url($alias_record['db-url']);
  // Adjustments for aliases to drupal instances (as opposed to aliases that are site lists)
  if (array_key_exists('uri', $alias_record)) {
    // Make sure that there is always a 'path-aliases' array
    if (!array_key_exists('path-aliases', $alias_record)) {
      $alias_record['path-aliases'] = array();
    // If there is a 'root' entry, then copy it to the '%root' path alias
    $alias_record['path-aliases']['%root'] = $alias_record['root'];