mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
Merge pull request #237 from creative-commoners/pulls/5.2/remove-self
ENH Use class name instead of self
This commit is contained in:
commit
12f8218268
@ -24,11 +24,11 @@ class ContentReviewCompatability
|
|||||||
public static function start()
|
public static function start()
|
||||||
{
|
{
|
||||||
$compatibility = [
|
$compatibility = [
|
||||||
self::SUBSITES => null,
|
ContentReviewCompatability::SUBSITES => null,
|
||||||
];
|
];
|
||||||
|
|
||||||
if (ClassInfo::exists(Subsite::class)) {
|
if (ClassInfo::exists(Subsite::class)) {
|
||||||
$compatibility[self::SUBSITES] = Subsite::$disable_subsite_filter;
|
$compatibility[ContentReviewCompatability::SUBSITES] = Subsite::$disable_subsite_filter;
|
||||||
Subsite::disable_subsite_filter(true);
|
Subsite::disable_subsite_filter(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ class ContentReviewCompatability
|
|||||||
public static function done(array $compatibility)
|
public static function done(array $compatibility)
|
||||||
{
|
{
|
||||||
if (class_exists(Subsite::class)) {
|
if (class_exists(Subsite::class)) {
|
||||||
Subsite::$disable_subsite_filter = $compatibility[self::SUBSITES];
|
Subsite::$disable_subsite_filter = $compatibility[ContentReviewCompatability::SUBSITES];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -335,7 +335,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
|||||||
Requirements::javascript('silverstripe/contentreview:client/dist/js/contentreview.js');
|
Requirements::javascript('silverstripe/contentreview:client/dist/js/contentreview.js');
|
||||||
// Display read-only version only
|
// Display read-only version only
|
||||||
if (!Permission::check("EDIT_CONTENT_REVIEW_FIELDS")) {
|
if (!Permission::check("EDIT_CONTENT_REVIEW_FIELDS")) {
|
||||||
$schedule = self::get_schedule();
|
$schedule = SiteTreeContentReview::get_schedule();
|
||||||
$contentOwners = ReadonlyField::create(
|
$contentOwners = ReadonlyField::create(
|
||||||
"ROContentOwners",
|
"ROContentOwners",
|
||||||
_t(__CLASS__ . ".CONTENTOWNERS", "Content Owners"),
|
_t(__CLASS__ . ".CONTENTOWNERS", "Content Owners"),
|
||||||
@ -429,7 +429,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
|||||||
$reviewFrequency = DropdownField::create(
|
$reviewFrequency = DropdownField::create(
|
||||||
"ReviewPeriodDays",
|
"ReviewPeriodDays",
|
||||||
_t(__CLASS__ . ".REVIEWFREQUENCY", "Review frequency"),
|
_t(__CLASS__ . ".REVIEWFREQUENCY", "Review frequency"),
|
||||||
self::get_schedule()
|
SiteTreeContentReview::get_schedule()
|
||||||
)
|
)
|
||||||
->addExtraClass('custom-setting')
|
->addExtraClass('custom-setting')
|
||||||
->setDescription(_t(
|
->setDescription(_t(
|
||||||
|
Loading…
Reference in New Issue
Block a user