mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Compare commits
3 Commits
4.2.0-beta
...
3
Author | SHA1 | Date | |
---|---|---|---|
|
ed0f42a509 | ||
|
031545737d | ||
|
9fae326927 |
@ -35,6 +35,10 @@ class BlogMemberExtension extends DataExtension
|
|||||||
'BlogProfileImage' => Image::class
|
'BlogProfileImage' => Image::class
|
||||||
];
|
];
|
||||||
|
|
||||||
|
private static array $owns = [
|
||||||
|
'BlogProfileImage',
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
@ -59,11 +63,6 @@ class BlogMemberExtension extends DataExtension
|
|||||||
$this->owner->URLSegment = preg_replace('/-[0-9]+$/', '', $this->owner->URLSegment ?? '') . '-' . $count;
|
$this->owner->URLSegment = preg_replace('/-[0-9]+$/', '', $this->owner->URLSegment ?? '') . '-' . $count;
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auto publish profile images
|
|
||||||
if ($this->owner->BlogProfileImage() && $this->owner->BlogProfileImage()->exists()) {
|
|
||||||
$this->owner->BlogProfileImage()->publishSingle();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user