function drush_sitealias_cache_db_settings

8.0.x drush_sitealias_cache_db_settings(&$alias_record, $databases)
6.x drush_sitealias_cache_db_settings(&$alias_record, $databases)
7.x drush_sitealias_cache_db_settings(&$alias_record, $databases)
4.x drush_sitealias_cache_db_settings(&$alias_record, $databases)
5.x drush_sitealias_cache_db_settings(&$alias_record, $databases)
master drush_sitealias_cache_db_settings(&$alias_record, $databases)
2 calls to drush_sitealias_cache_db_settings()
drush_sitealias_add_db_settings in includes/
If the alias record does not contain a 'databases' or 'db-url' entry, then use backend invoke to look up the settings value from the remote or local site. The 'databases' form is preferred; 'db_url' will be…
drush_upgrade_fix_db_url in commands/core/
Replace db_url with DB name from target. updatedb will later append a DBTNG compatible version.


includes/, line 658
The site alias API.


function drush_sitealias_cache_db_settings(&$alias_record, $databases) {
  if (!empty($databases)) {
    $alias_record['databases'] = $databases;

  // If the name is set, then re-cache the record after we fetch the databases
  if (array_key_exists('#name', $alias_record)) {
    $all_site_aliases = &drush_get_context('site-aliases');
    $all_site_aliases[$alias_record['#name']] = $alias_record;
    // Check and see if this record is a copy of 'self'
    if (($alias_record['#name'] != 'self') && array_key_exists('@self', $all_site_aliases) && ($all_site_aliases['@self']['#name'] == $alias_record['#name'])) {
      $all_site_aliases['@self'] = $alias_record;