Merge pull request #12029 from altatof/limitlang

NEW : add MAIN_LANGUAGES_ALLOWED constant to limit languages displayed
This commit is contained in:
Laurent Destailleur 2019-10-03 18:08:35 +02:00 committed by GitHub
commit e9163015e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -781,6 +781,8 @@ class Translate
if (preg_match('/^[a-z]+_[A-Z]+/i', $dir))
{
$this->load("languages");
if (! empty($conf->global->MAIN_LANGUAGES_ALLOWED) && ! in_array($dir, explode(',', $conf->global->MAIN_LANGUAGES_ALLOWED)) ) continue;
if ($usecode == 2)
{