summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2016-08-13 23:52:22 +0100
committerAlex Pott2016-08-13 23:52:29 +0100
commit94becf07e5beaabf36c610e8e016b4db5ff86d14 (patch)
tree9b53c3ff3d6265afcc49eb6d271e74d8b810771e
parent4babdeb5d77c5e2018b1e201192bbb26ab90b797 (diff)
Issue #2763283 by naught101, thomas73: Failure on comments with no subject
(cherry picked from commit 24343f970b06efe32d6780028c4934f29f285f56)
-rw-r--r--core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php2
-rw-r--r--core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php
index ea987be..5d16ed0 100644
--- a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php
+++ b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php
@@ -20,7 +20,7 @@ class CommentVariablePerCommentType extends CommentVariable {
$return = array();
foreach ($node_types as $node_type => $data) {
// Only 2 comment types depending on subject field visibility.
- if (empty($data['comment_subject_field'])) {
+ if (!empty($data['comment_subject_field'])) {
// Default label and description should be set in migration.
$return['comment'] = array(
'comment_type' => 'comment',
diff --git a/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php b/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php
index 0055a2c..75d0932 100644
--- a/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php
+++ b/core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php
@@ -24,10 +24,10 @@ class CommentVariablePerCommentTypeTest extends MigrateSqlSourceTestCase {
// Each result will also include a label and description, but those are
// static values set by the source plugin and don't need to be asserted.
array(
- 'comment_type' => 'comment_no_subject',
+ 'comment_type' => 'comment',
),
array(
- 'comment_type' => 'comment',
+ 'comment_type' => 'comment_no_subject',
),
);