From 061245fe8e514f0676d56106a3e03f03ee09e253 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 5 Jun 2024 15:28:36 +1200 Subject: [PATCH] ENH Use class name instead of self --- src/Compatibility/ContentReviewCompatability.php | 6 +++--- src/Extensions/SiteTreeContentReview.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Compatibility/ContentReviewCompatability.php b/src/Compatibility/ContentReviewCompatability.php index ed5a0c8..a088946 100644 --- a/src/Compatibility/ContentReviewCompatability.php +++ b/src/Compatibility/ContentReviewCompatability.php @@ -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 @@ 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]; } } } diff --git a/src/Extensions/SiteTreeContentReview.php b/src/Extensions/SiteTreeContentReview.php index 2e00dd4..f5fca23 100644 --- a/src/Extensions/SiteTreeContentReview.php +++ b/src/Extensions/SiteTreeContentReview.php @@ -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"), @@ -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(