Merge branch '3' into 4.0

This commit is contained in:
Guy Sartorelli 2024-04-19 12:07:06 +12:00
commit 31bcc5c727
No known key found for this signature in database
GPG Key ID: F313E3B9504D496A
3 changed files with 22 additions and 5 deletions

View File

@ -45,11 +45,17 @@ sk:
PLURALNAME: 'Kategórie blogu'
SINGULARNAME: 'Kategória blogu'
Title: Názov
belongs_many_many_BlogPosts: 'Príspevky v blogu'
db_Title: Názov
db_URLSegment: 'Časť URL'
has_one_Blog: Blog
SilverStripe\Blog\Model\BlogMemberExtension:
BLOGPOSTS: 'Základné stránky'
TABBLOGPOSTS: 'Základné stránky'
belongs_many_many_BlogPosts: 'Príspevky v blogu'
db_BlogProfileSummary: 'Prehľad profilu blogu'
db_URLSegment: 'Časť URL'
has_one_BlogProfileImage: 'Profilový obrázok blogu'
SilverStripe\Blog\Model\BlogObject:
Title: Názov
SilverStripe\Blog\Model\BlogPost:
@ -75,7 +81,9 @@ sk:
PLURALNAME: 'Štítky blogu'
SINGULARNAME: 'Štítok blogu'
Title: Názov
belongs_many_many_BlogPosts: 'Príspevky v blogu'
db_Title: Názov
db_URLSegment: 'Časť URL'
has_one_Blog: Blog
SilverStripe\Blog\Widgets\BlogArchiveWidget:
ArchiveType: 'Typ archívu'

View File

@ -11,17 +11,27 @@ sl:
AND: in
Archive: Arhiv
Comments: Komentarji
FILTERDESCRIPTION_PAGE: 'Stran {page}'
PLURALNAME: 'Izvorna stran'
SilverStripe\Blog\Model\BlogCategory:
belongs_many_many_BlogPosts: 'Zapisi na blogu'
db_Title: Naziv
db_URLSegment: 'Naslov URL'
SilverStripe\Blog\Model\BlogMemberExtension:
belongs_many_many_BlogPosts: 'Zapisi na blogu'
db_BlogProfileSummary: 'Povzetek blogerskega profila'
db_URLSegment: 'Naslov URL'
has_one_BlogProfileImage: 'Osebna podoba'
SilverStripe\Blog\Model\BlogObject:
Title: Naziv
SilverStripe\Blog\Model\BlogPost:
AUTHOR: Avtor
PLURALNAME: 'Izvorna stran'
SilverStripe\Blog\Model\BlogTag:
belongs_many_many_BlogPosts: 'Zapisi na blogu'
db_Title: Naziv
db_URLSegment: 'Naslov URL'
SilverStripe\Blog\Widgets\BlogCategoriesWidget:
Sort: Razvrščanje
SilverStripe\Blog\Widgets\BlogTagsWidget:
Sort: Razvrščanje

View File

@ -35,6 +35,10 @@ class BlogMemberExtension extends DataExtension
'BlogProfileImage' => Image::class
];
private static array $owns = [
'BlogProfileImage',
];
/**
* @var array
*/
@ -59,11 +63,6 @@ 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();
}
}
/**