Fixed bug #9795: Default values have no labels in the multiple select control inside...
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Wed, 28 Oct 2009 12:43:26 +0000 (12:43 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Wed, 28 Oct 2009 12:43:26 +0000 (12:43 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6294 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php

index f4f072b..4e92a85 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-10-28  Dmitry Dulepov  <dmitry.dulepov@gmail.com>
+
+       * Fixed bug #9795: Default values have no labels in the multiple select control inside the flexform
+
 2009-10-27  Steffen Kamper  <info@sk-typo3.de>
 
        * Follow-up to #11370: Inconsistent Login Screen doesn't show system required errors
index d0b74b2..855883f 100644 (file)
@@ -2033,6 +2033,15 @@ class t3lib_TCEforms     {
                        } elseif (isset($PA['fieldTSConfig']['altLabels.'][$evalValue])) {
                                $tvP[1] = rawurlencode($this->sL($PA['fieldTSConfig']['altLabels.'][$evalValue]));
                        }
+                       if ($tvP[1] == '') {
+                                       // Case: flexform, default values supplied, no label provided (bug #9795)
+                               foreach ($selItems as $selItem) {
+                                       if ($selItem[1] == $tvP[0]) {
+                                               $tvP[1] = $selItem[0];
+                                               break;
+                                       }
+                               }
+                       }
                        $itemArray[$tk] = implode('|',$tvP);
                }
                $itemsToSelect = '';