Skip to content

Commit

Permalink
Merge branch '3' into 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 23, 2024
2 parents 85664ce + ed0f42a commit 5b41829
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Model/BlogMemberExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class BlogMemberExtension extends DataExtension
'BlogProfileImage' => Image::class
];

private static array $owns = [
'BlogProfileImage',
];

/**
* @var array
*/
Expand All @@ -61,11 +65,6 @@ public function onBeforeWrite()
$this->owner->URLSegment = preg_replace('/-[0-9]+$/', '', $this->owner->URLSegment ?? '') . '-' . $count;
$count++;
}

// Auto publish profile images
if ($this->owner->BlogProfileImage() && $this->owner->BlogProfileImage()->exists()) {
$this->owner->BlogProfileImage()->publishSingle();
}
}

/**
Expand Down

0 comments on commit 5b41829

Please sign in to comment.