Commit 266faad9 authored by yched's avatar yched
Browse files

Issue #1262676 by Jody Lynn: Fixed 'drush content-migrate' broken with Druash 5

parent 585e1486
......@@ -92,10 +92,21 @@ function drush_content_migrate_fields() {
}
foreach ($field_names as $field_name) {
drush_invoke_process_args('content-migrate-field-structure', array($field_name));
// Allow compatibility with drush 4 and later.
if (function_exists('drush_invoke_process_args')) {
drush_invoke_process_args('content-migrate-field-structure', array($field_name));
}
else {
drush_invoke_process('@self', 'content-migrate-field-structure', array($field_name));
}
}
foreach ($field_names as $field_name) {
drush_invoke_process_args('content-migrate-field-data', array($field_name));
if (function_exists('drush_invoke_process_args')) {
drush_invoke_process_args('content-migrate-field-data', array($field_name));
}
else {
drush_invoke_process('@self', 'content-migrate-field-data', array($field_name));
}
}
// TODO: make an API function for this in Drush.
_drush_log_drupal_messages();
......@@ -163,4 +174,4 @@ function drush_content_migrate_get_fields($requests = array(), $status = 'availa
}
}
return $field_names;
}
\ No newline at end of file
}
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