Skip to content

Commit

Permalink
Merge pull request #237 from creative-commoners/pulls/5.2/remove-self
Browse files Browse the repository at this point in the history
ENH Use class name instead of self
  • Loading branch information
GuySartorelli authored Jun 17, 2024
2 parents 91876b5 + 061245f commit 12f8218
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Compatibility/ContentReviewCompatability.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -41,7 +41,7 @@ public static function start()
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];
}
}
}
4 changes: 2 additions & 2 deletions src/Extensions/SiteTreeContentReview.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public function updateSettingsFields(FieldList $fields)
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"),
Expand Down Expand Up @@ -429,7 +429,7 @@ public function updateSettingsFields(FieldList $fields)
$reviewFrequency = DropdownField::create(
"ReviewPeriodDays",
_t(__CLASS__ . ".REVIEWFREQUENCY", "Review frequency"),
self::get_schedule()
SiteTreeContentReview::get_schedule()
)
->addExtraClass('custom-setting')
->setDescription(_t(
Expand Down

0 comments on commit 12f8218

Please sign in to comment.