mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX Fixed CMSMain->LangSelector() default language selection
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@76870 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d0e3ae5d6b
commit
8362026b12
@ -1250,7 +1250,15 @@ JS;
|
|||||||
function LangSelector() {
|
function LangSelector() {
|
||||||
$member = Member::currentUser(); //check to see if the current user can switch langs or not
|
$member = Member::currentUser(); //check to see if the current user can switch langs or not
|
||||||
if(Permission::checkMember($member, 'VIEW_LANGS')) {
|
if(Permission::checkMember($member, 'VIEW_LANGS')) {
|
||||||
return new LanguageDropdownField('LangSelector', 'Language', array(), 'SiteTree', 'Locale-English');
|
$dropdown = new LanguageDropdownField(
|
||||||
|
'LangSelector',
|
||||||
|
'Language',
|
||||||
|
array(),
|
||||||
|
'SiteTree',
|
||||||
|
'Locale-English'
|
||||||
|
);
|
||||||
|
$dropdown->setValue(Translatable::get_current_locale());
|
||||||
|
return $dropdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
//user doesn't have permission to switch langs so just show a string displaying current language
|
//user doesn't have permission to switch langs so just show a string displaying current language
|
||||||
|
Loading…
Reference in New Issue
Block a user