Skip to content

Commit

Permalink
Merge branch '3.12' into 3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 23, 2024
2 parents ca0624c + 0315457 commit ed0f42a
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 @@ -35,6 +35,10 @@ class BlogMemberExtension extends DataExtension
'BlogProfileImage' => Image::class
];

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

/**
* @var array
*/
Expand All @@ -59,11 +63,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 ed0f42a

Please sign in to comment.