Commit 396513f4 authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

Fix an issue with the import task that can irrecoverably break sites

parent 61236e8f
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
if (is_array($GLOBALS['db_url'])) { if (is_array($GLOBALS['db_url'])) {
$db_url = $GLOBALS['db_url']['default']; $db_url = $GLOBALS['db_url']['default'];
} }
else {
$db_url = $GLOBALS['db_url'];
}
if ($parts = @parse_url($db_url)) { if ($parts = @parse_url($db_url)) {
drush_set_option('db_type', $parts['scheme'], 'site'); drush_set_option('db_type', $parts['scheme'], 'site');
......
<?php <?php
if ($parts = @parse_url($GLOBALS['db_url'])) { if (is_array($GLOBALS['db_url'])) {
$db_url = $GLOBALS['db_url']['default'];
}
else {
$db_url = $GLOBALS['db_url'];
}
if ($parts = @parse_url($db_url)) {
drush_set_option('db_type', $parts['scheme'], 'site'); drush_set_option('db_type', $parts['scheme'], 'site');
drush_set_option('db_user', $parts['user'], 'site'); drush_set_option('db_user', $parts['user'], 'site');
drush_set_option('db_host', $parts['host'], 'site'); drush_set_option('db_host', $parts['host'], 'site');
......
...@@ -19,6 +19,6 @@ function provision_drupal_provision_import_validate() { ...@@ -19,6 +19,6 @@ function provision_drupal_provision_import_validate() {
*/ */
function provision_drupal_provision_import($url = NULL) { function provision_drupal_provision_import($url = NULL) {
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL); drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);
drush_include_engine('drupal', 'import'); drush_include_engine('drupal', 'import', drush_drupal_major_version());
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment