Skip to content

Commit

Permalink
Merge branch '4.2' into 4
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 23, 2024
2 parents 37d2ccf + 984bf3a commit 26fbc93
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 @@ -40,6 +40,10 @@ class BlogMemberExtension extends DataExtension
'BlogProfileImage' => Image::class
];

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

/**
* @var array
*/
Expand All @@ -64,11 +68,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 26fbc93

Please sign in to comment.