summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Ryan2012-01-17 15:17:54 -0500
committerMike Ryan2012-01-17 15:17:54 -0500
commit2e2bdd0569e425828f15e19179ffdc03cbd0091f (patch)
treeb51ca274f3c66dc7a4c321762fd08ba75ebbe8fc
parent0cc98889776d0ed94c2861adfb6f7e457ad6e463 (diff)
Issue #1403222 by mikeryan: Releaxed setting of bundle for node destinations
-rw-r--r--CHANGELOG.txt1
-rw-r--r--plugins/destinations/node.inc8
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 7d98a83..6ece00e 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -3,6 +3,7 @@ Next release
============
Features and enhancements
+- #1403222 - Relaxed setting of bundle for node destinations.
- #1364326 - Default --limit option to items.
- #1337640 - Properly optimize the SQL source query for highwater marks.
- #1366588 - Source plugin support has been refactored to put more of the common
diff --git a/plugins/destinations/node.inc b/plugins/destinations/node.inc
index f7fbcb0..77f0b6b 100644
--- a/plugins/destinations/node.inc
+++ b/plugins/destinations/node.inc
@@ -151,10 +151,14 @@ class MigrateDestinationNode extends MigrateDestinationEntity {
$node->uid = $old_node->uid;
}
}
+ else if (!isset($node->type)) {
+ // Default the type to our designated destination bundle (by doing this
+ // conditionally, we permit some flexibility in terms of implementing
+ // migrations which can affect more than one type).
+ $node->type = $this->bundle;
+ }
// Set some required properties.
- // Set type before invoking prepare handlers - they may take type-dependent actions.
- $node->type = $this->bundle;
if ($migration->getSystemOfRecord() == Migration::SOURCE) {
if (!isset($node->language)) {