MDL-66197 core: correct get parent language
This commit is contained in:
+1
-10
@@ -7070,21 +7070,12 @@ function current_language() {
|
||||
*/
|
||||
function get_parent_language($lang=null) {
|
||||
|
||||
// Let's hack around the current language.
|
||||
if (!empty($lang)) {
|
||||
$oldforcelang = force_current_language($lang);
|
||||
}
|
||||
$parentlang = get_string_manager()->get_string('parentlanguage', 'langconfig', null, $lang);
|
||||
|
||||
$parentlang = get_string('parentlanguage', 'langconfig');
|
||||
if ($parentlang === 'en') {
|
||||
$parentlang = '';
|
||||
}
|
||||
|
||||
// Let's hack around the current language.
|
||||
if (!empty($lang)) {
|
||||
force_current_language($oldforcelang);
|
||||
}
|
||||
|
||||
return $parentlang;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user