Commit 8685e7c7 authored by webchick's avatar webchick

Issue #2907233 by quietone, madlobz, heddn, maxocub: File migration from D6 to...

Issue #2907233 by quietone, madlobz, heddn, maxocub: File migration from D6 to D8 version using Migrate Drupal UI
parent df0b92d3
...@@ -403,9 +403,13 @@ public function validateCredentialForm(array &$form, FormStateInterface $form_st ...@@ -403,9 +403,13 @@ public function validateCredentialForm(array &$form, FormStateInterface $form_st
// Store the retrieved migration IDs in form storage. // Store the retrieved migration IDs in form storage.
$form_state->set('version', $version); $form_state->set('version', $version);
$form_state->set('migrations', $migration_array); $form_state->set('migrations', $migration_array);
$form_state->set('source_base_path', $form_state->getValue('source_base_path')); if ($version == 6) {
$form_state->set('source_base_path', $form_state->getValue('d6_source_base_path'));
}
else {
$form_state->set('source_base_path', $form_state->getValue('source_base_path'));
}
$form_state->set('source_private_file_path', $form_state->getValue('source_private_file_path')); $form_state->set('source_private_file_path', $form_state->getValue('source_private_file_path'));
// Store the retrived system data in form storage. // Store the retrived system data in form storage.
$form_state->set('system_data', $system_data); $form_state->set('system_data', $system_data);
} }
......
...@@ -131,10 +131,15 @@ public function testMigrateUpgrade() { ...@@ -131,10 +131,15 @@ public function testMigrateUpgrade() {
$version = $this->getLegacyDrupalVersion($this->sourceDatabase); $version = $this->getLegacyDrupalVersion($this->sourceDatabase);
$edit = [ $edit = [
$driver => $connection_options, $driver => $connection_options,
'source_base_path' => $this->getSourceBasePath(),
'source_private_file_path' => $this->getSourceBasePath(), 'source_private_file_path' => $this->getSourceBasePath(),
'version' => $version, 'version' => $version,
]; ];
if ($version == 6) {
$edit['d6_source_base_path'] = $this->getSourceBasePath();
}
else {
$edit['source_base_path'] = $this->getSourceBasePath();
}
if (count($drivers) !== 1) { if (count($drivers) !== 1) {
$edit['driver'] = $driver; $edit['driver'] = $driver;
} }
......
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