mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
MINOR Moved Translatable::choose_site_locale() from LeftAndMain to CMSMain, its not necessary in other core controllers (other than specifically customized ModelAdmin instances)
This commit is contained in:
parent
466add9bb2
commit
7d9904d1f1
@ -77,6 +77,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function init() {
|
public function init() {
|
||||||
|
// set reading lang
|
||||||
|
if(Object::has_extension('SiteTree', 'Translatable') && !$this->isAjax()) {
|
||||||
|
Translatable::choose_site_locale(array_keys(Translatable::get_existing_content_languages('SiteTree')));
|
||||||
|
}
|
||||||
|
|
||||||
parent::init();
|
parent::init();
|
||||||
|
|
||||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.js');
|
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.js');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user