mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
Merge branch 'MDL-69788' of https://github.com/paulholden/moodle
This commit is contained in:
commit
a9ab6a1db7
5 changed files with 85 additions and 2 deletions
|
@ -533,7 +533,13 @@ class core_string_manager_standard implements core_string_manager {
|
|||
$languages[$langcode] = !empty($this->transaliases[$langcode]) ? $this->transaliases[$langcode] : $langname;
|
||||
}
|
||||
}
|
||||
return $languages;
|
||||
|
||||
// If there are no valid enabled translations, then return all languages.
|
||||
if (!empty($languages)) {
|
||||
return $languages;
|
||||
} else {
|
||||
return $cachedlist;
|
||||
}
|
||||
}
|
||||
|
||||
// Get all languages available in system.
|
||||
|
@ -584,7 +590,12 @@ class core_string_manager_standard implements core_string_manager {
|
|||
}
|
||||
}
|
||||
|
||||
return $languages;
|
||||
// If there are no valid enabled translations, then return all languages.
|
||||
if (!empty($languages)) {
|
||||
return $languages;
|
||||
} else {
|
||||
return $cachedlist;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue