X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ftaxonomy%2Fsrc%2FPlugin%2Fmigrate%2Fsource%2Fd6%2FVocabulary.php;fp=web%2Fcore%2Fmodules%2Ftaxonomy%2Fsrc%2FPlugin%2Fmigrate%2Fsource%2Fd6%2FVocabulary.php;h=767daf45e121574e7f615ab407262f10a30becd2;hp=714fa933104a3f51a8c361faab69aabe1f515cb4;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php b/web/core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php index 714fa9331..767daf45e 100644 --- a/web/core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php +++ b/web/core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php @@ -11,7 +11,7 @@ use Drupal\Core\Field\FieldStorageDefinitionInterface; * * @MigrateSource( * id = "d6_taxonomy_vocabulary", - * source_provider = "taxonomy" + * source_module = "taxonomy" * ) */ class Vocabulary extends DrupalSqlBase { @@ -69,6 +69,14 @@ class Vocabulary extends DrupalSqlBase { ->fetchCol(); $row->setSourceProperty('node_types', $node_types); $row->setSourceProperty('cardinality', ($row->getSourceProperty('tags') == 1 || $row->getSourceProperty('multiple') == 1) ? FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED : 1); + + // If the vocabulary being migrated is the one defined in the + // 'forum_nav_vocabulary' variable, set the 'forum_vocabulary' source + // property to true so we know this is the vocabulary used by Forum. + if ($this->variableGet('forum_nav_vocabulary', 0) == $row->getSourceProperty('vid')) { + $row->setSourceProperty('forum_vocabulary', TRUE); + } + return parent::prepareRow($row); }