Merge pull request #237 from creative-commoners/pulls/5.2/remove-self

ENH Use class name instead of self
This commit is contained in:
Guy Sartorelli 2024-06-17 12:39:36 +12:00 committed by GitHub
commit 12f8218268
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -24,11 +24,11 @@ class ContentReviewCompatability
public static function start()
{
$compatibility = [
self::SUBSITES => null,
ContentReviewCompatability::SUBSITES => null,
];
if (ClassInfo::exists(Subsite::class)) {
$compatibility[self::SUBSITES] = Subsite::$disable_subsite_filter;
$compatibility[ContentReviewCompatability::SUBSITES] = Subsite::$disable_subsite_filter;
Subsite::disable_subsite_filter(true);
}
@ -41,7 +41,7 @@ class ContentReviewCompatability
public static function done(array $compatibility)
{
if (class_exists(Subsite::class)) {
Subsite::$disable_subsite_filter = $compatibility[self::SUBSITES];
Subsite::$disable_subsite_filter = $compatibility[ContentReviewCompatability::SUBSITES];
}
}
}

View File

@ -335,7 +335,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
Requirements::javascript('silverstripe/contentreview:client/dist/js/contentreview.js');
// Display read-only version only
if (!Permission::check("EDIT_CONTENT_REVIEW_FIELDS")) {
$schedule = self::get_schedule();
$schedule = SiteTreeContentReview::get_schedule();
$contentOwners = ReadonlyField::create(
"ROContentOwners",
_t(__CLASS__ . ".CONTENTOWNERS", "Content Owners"),
@ -429,7 +429,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
$reviewFrequency = DropdownField::create(
"ReviewPeriodDays",
_t(__CLASS__ . ".REVIEWFREQUENCY", "Review frequency"),
self::get_schedule()
SiteTreeContentReview::get_schedule()
)
->addExtraClass('custom-setting')
->setDescription(_t(