function drush_sitealias_convert_databases_to_db_url

8.0.x drush_sitealias_convert_databases_to_db_url($databases)
7.x drush_sitealias_convert_databases_to_db_url($databases)
master drush_sitealias_convert_databases_to_db_url($databases)

Create a db-url from the databases record.

2 calls to drush_sitealias_convert_databases_to_db_url()
drush_sitealias_add_db_url 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 'db_url' form is preferred; nothing is done if…
_drush_sitealias_prepare_record in commands/core/
Given a site alias name, print out a php-syntax representation of it.


includes/, line 910
The site alias API.


function drush_sitealias_convert_databases_to_db_url($databases) {
  if ((count($databases) == 1) && isset($databases['default'])) {
    $result = drush_sitealias_convert_db_spec_to_db_url($databases['default']['default']);
  else {
    foreach ($databases as $key => $db_info) {
      $result[$key] = drush_sitealias_convert_db_spec_to_db_url($db_info['default']);
  return $result;