From f798ef1d7643e0b830e72023819ce3781f229286 Mon Sep 17 00:00:00 2001 From: acognet Date: Mon, 23 May 2022 14:19:24 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B04538=20-=20Dashlet=20Groupby=20on=20Exte?= =?UTF-8?q?rnalKey=20with=20special=20character,=20bad=20display=20=20-=20?= =?UTF-8?q?remove=20useless=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/forms.class.inc.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/application/forms.class.inc.php b/application/forms.class.inc.php index a28d5154c..98bf445d0 100644 --- a/application/forms.class.inc.php +++ b/application/forms.class.inc.php @@ -1223,7 +1223,7 @@ class DesignerComboField extends DesignerFormField $sChecked = $this->defaultValue ? 'checked' : ''; $sMandatory = $this->bMandatory ? 'true' : 'false'; $sReadOnly = $this->IsReadOnly() ? 'disabled="disabled"' : ''; - if ($this->IsSorted() && isset($this->aAllowedValues) ) + if ($this->IsSorted() ) { asort($this->aAllowedValues); } @@ -1271,17 +1271,15 @@ class DesignerComboField extends DesignerFormField $sHtml .= ""; } } - if ( isset($this->aAllowedValues) ) { - foreach ($this->aAllowedValues as $sKey => $sDisplayValue) { - if ($this->bMultipleSelection) { - $sSelected = in_array($sKey, $this->defaultValue) ? 'selected' : ''; - } else { - $sSelected = ($sKey == $this->defaultValue) ? 'selected' : ''; - } - // Quick and dirty: display the menu parents as a tree - $sHtmlValue = str_replace(' ', ' ', $sDisplayValue); - $sHtml .= ""; + foreach ($this->aAllowedValues as $sKey => $sDisplayValue) { + if ($this->bMultipleSelection) { + $sSelected = in_array($sKey, $this->defaultValue) ? 'selected' : ''; + } else { + $sSelected = ($sKey == $this->defaultValue) ? 'selected' : ''; } + // Quick and dirty: display the menu parents as a tree + $sHtmlValue = str_replace(' ', ' ', $sDisplayValue); + $sHtml .= ""; } $sHtml .= ""; if ($this->bOtherChoices)