mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX Removed calls to Translatable::is_enabled() since it's deprecated, replaced with Object::has_extension('SiteTree', 'Translatable') instead (from r93676)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@93953 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
276a36e493
commit
51a330f594
@ -275,7 +275,7 @@ JS;
|
||||
}
|
||||
|
||||
// Don't open a page from a different locale
|
||||
if($record && Translatable::is_enabled() && $record->Locale && $record->Locale != Translatable::get_current_locale()) {
|
||||
if($record && Object::has_extension('SiteTree', 'Translatable') && $record->Locale && $record->Locale != Translatable::get_current_locale()) {
|
||||
$record = null;
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ class LeftAndMain extends Controller {
|
||||
);
|
||||
|
||||
// set reading lang
|
||||
if(Translatable::is_enabled() && !Director::is_ajax()) {
|
||||
if(Object::has_extension('SiteTree', 'Translatable') && !Director::is_ajax()) {
|
||||
Translatable::choose_site_locale(array_keys(Translatable::get_existing_content_languages('SiteTree')));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user