From 47fcddc9a619e2a49371f5b4ca55085e55ddb5ee Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Mon, 27 Sep 2021 17:35:52 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B04326=20-=20Fix=20external=20keys=20in=20?= =?UTF-8?q?dynamic=20header=20dashlet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/displayblock.class.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/displayblock.class.inc.php b/application/displayblock.class.inc.php index 7e711e928..c4ed8ff1b 100644 --- a/application/displayblock.class.inc.php +++ b/application/displayblock.class.inc.php @@ -1012,9 +1012,10 @@ JS $aCountsQueryResults[$aCountGroupBySingleResult[0]] = $aCountGroupBySingleResult[1]; } + $oAttDef = MetaModel::GetAttributeDef($sClass, $sStateAttrCode); + $aValues = $oAttDef->GetAllowedValues(); foreach ($aStates as $sStateValue) { - $oAttDef = MetaModel::GetAttributeDef($sClass, $sStateAttrCode); - $aStateLabels[$sStateValue] = $oAttDef->GetAsPlainText($sStateValue); + $aStateLabels[$sStateValue] = $aValues[$sStateValue]; $aCounts[$sStateValue] = (array_key_exists($sStateValue, $aCountsQueryResults)) ? $aCountsQueryResults[$sStateValue] : 0;