mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
FIX Blog tag migration is per Blog
This commit is contained in:
parent
6100a89d3a
commit
05a4b57fb1
@ -38,7 +38,7 @@ class BlogEntry extends BlogPost implements MigratableObject {
|
|||||||
//Migrate comma separated tags into BlogTag objects.
|
//Migrate comma separated tags into BlogTag objects.
|
||||||
foreach($this->TagNames() as $tag) {
|
foreach($this->TagNames() as $tag) {
|
||||||
|
|
||||||
$existingTag = BlogTag::get()->filter('Title', $tag);
|
$existingTag = BlogTag::get()->filter(array('Title' => $tag, 'BlogID' => $this->ParentID));
|
||||||
if($existingTag->count()) {
|
if($existingTag->count()) {
|
||||||
//if tag already exists we will simply add it to this post.
|
//if tag already exists we will simply add it to this post.
|
||||||
$tagObject = $existingTag->First();
|
$tagObject = $existingTag->First();
|
||||||
|
Loading…
Reference in New Issue
Block a user