Compare commits
No commits in common. "ed0f42a509f801161d1d6acb343295851f25c52f" and "ca0624cc2539de31d6a3070bbbf702f8ea75f650" have entirely different histories.
ed0f42a509
...
ca0624cc25
|
@ -35,10 +35,6 @@ class BlogMemberExtension extends DataExtension
|
|||
'BlogProfileImage' => Image::class
|
||||
];
|
||||
|
||||
private static array $owns = [
|
||||
'BlogProfileImage',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -63,6 +59,11 @@ class BlogMemberExtension extends DataExtension
|
|||
$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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue