From 96f1bd3646a30da80e9699ffc95bf2cb9012d96f Mon Sep 17 00:00:00 2001 From: Molkobain Date: Wed, 21 Jun 2023 18:33:12 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B06462=20-=20Sort=20\AttributeApplicationL?= =?UTF-8?q?anguage=20alphabetically=20(eg.=20"Language"=20in=20ActionEmail?= =?UTF-8?q?=20class)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/attributedef.class.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index f8fff6c28..afeb6e670 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -3873,6 +3873,12 @@ class AttributeApplicationLanguage extends AttributeString { $aLanguageCodes[$sLangCode] = $aInfo['description'].' ('.$aInfo['localized_description'].')'; } + + // N°6462 This should be sorted directly in \Dict during the compilation but we can't for 2 reasons: + // - Additional languages can be added on the fly even though it is not recommended + // - Formatting is done at run time (just above) + natcasesort($aLanguageCodes); + $aParams["allowed_values"] = new ValueSetEnum($aLanguageCodes); parent::__construct($sCode, $aParams); }