function drush_sitealias_convert_db_from_db_url

8.0.x drush_sitealias_convert_db_from_db_url($db_url)
6.x drush_sitealias_convert_db_from_db_url($db_url)
7.x drush_sitealias_convert_db_from_db_url($db_url)
3.x drush_sitealias_convert_db_from_db_url($db_url)
4.x drush_sitealias_convert_db_from_db_url($db_url)
5.x drush_sitealias_convert_db_from_db_url($db_url)
master drush_sitealias_convert_db_from_db_url($db_url)

Convert from an old-style database URL to an array of database settings


db_url: A Drupal 6 db-url string to convert, or an array with multiple db-urls.

Return value

array An array of database values.

2 calls to drush_sitealias_convert_db_from_db_url()
drush_archive_restore in commands/core/
Command callback. Restore web site(s) from a site archive file.
_drush_sitealias_add_static_defaults in includes/
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…


includes/, line 1670
The site alias API.


function drush_sitealias_convert_db_from_db_url($db_url) {
  $result = array();

  if (!is_array($db_url)) {
    $result = array('default' => array('default' => drush_convert_db_from_db_url($db_url)));
  else {
    foreach ($db_url as $one_name => $one_db_url) {
      $result[$one_name] = array('default' => drush_convert_db_from_db_url($one_db_url));

  return $result;