API Remove Translatable compatibility logic

This commit is contained in:
Raissa North 2018-01-09 09:30:20 +13:00
parent ad2932c418
commit f64561e1b4

View File

@ -4,13 +4,10 @@ namespace SilverStripe\ContentReview\Compatibility;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Subsites\Model\Subsite;
use Translatable;
// @todo add translatable namespace
/**
* This is a helper class which lets us do things with content review data without subsites
* and translatable messing our SQL queries up.
* messing our SQL queries up.
*
* Make sure any DataQuery instances you are building are BOTH created & executed between start()
* and done() because augmentDataQueryCreate and augmentSQL happens there.
@ -19,8 +16,6 @@ class ContentReviewCompatability
{
const SUBSITES = 0;
const TRANSLATABLE = 1;
/**
* Returns the state of other modules before compatibility mode is started.
*
@ -30,7 +25,6 @@ class ContentReviewCompatability
{
$compatibility = [
self::SUBSITES => null,
self::TRANSLATABLE => null,
];
if (ClassInfo::exists(Subsite::class)) {
@ -38,11 +32,6 @@ class ContentReviewCompatability
Subsite::disable_subsite_filter(true);
}
if (ClassInfo::exists(Translatable::class)) {
$compatibility[self::TRANSLATABLE] = Translatable::locale_filter_enabled();
Translatable::disable_locale_filter();
}
return $compatibility;
}
@ -54,9 +43,5 @@ class ContentReviewCompatability
if (class_exists(Subsite::class)) {
Subsite::$disable_subsite_filter = $compatibility[self::SUBSITES];
}
if (class_exists(Translatable::class)) {
Translatable::enable_locale_filter($compatibility[self::TRANSLATABLE]);
}
}
}