summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Rossouw2009-04-17 20:44:06 (GMT)
committeradrian2009-04-17 20:44:06 (GMT)
commit396513f46d9ed003e3f57e11fcc0b0d4f3de121f (patch)
tree1790fd3e83dfaa5923a1ada08b7fc0bdae967f53
parent61236e8f93d5808f28a4ceb9974556cc573fddad (diff)
Fix an issue with the import task that can irrecoverably break sites5.x-0.2-alpha1
-rw-r--r--platform/drupal/import_5.inc3
-rw-r--r--platform/drupal/import_6.inc9
-rw-r--r--platform/import.provision.inc2
3 files changed, 12 insertions, 2 deletions
diff --git a/platform/drupal/import_5.inc b/platform/drupal/import_5.inc
index 6c8959d..037ebdc 100644
--- a/platform/drupal/import_5.inc
+++ b/platform/drupal/import_5.inc
@@ -3,6 +3,9 @@
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');
diff --git a/platform/drupal/import_6.inc b/platform/drupal/import_6.inc
index 812b332..25fc7d7 100644
--- a/platform/drupal/import_6.inc
+++ b/platform/drupal/import_6.inc
@@ -1,6 +1,13 @@
<?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_user', $parts['user'], 'site');
drush_set_option('db_host', $parts['host'], 'site');
diff --git a/platform/import.provision.inc b/platform/import.provision.inc
index dcd5369..9870da4 100644
--- a/platform/import.provision.inc
+++ b/platform/import.provision.inc
@@ -19,6 +19,6 @@ function provision_drupal_provision_import_validate() {
*/
function provision_drupal_provision_import($url = NULL) {
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);
- drush_include_engine('drupal', 'import');
+ drush_include_engine('drupal', 'import', drush_drupal_major_version());
}