[BUGFIX] Fix wrong column title in web>list for field colpos
authorMartin Kästner <mkaestner@gmx.de>
Tue, 27 Nov 2012 15:41:57 +0000 (16:41 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 1 Dec 2012 15:12:09 +0000 (16:12 +0100)
When activating the field colPos for tt_content elements and using
a backend_layout the wrong column titles are shown, without respect
to a backend_layout set.

Resolves: #25113
Releases: 6.1, 6.0, 4.7, 4.6, 4.5

Change-Id: I21e19319a33e4408b0f9e226043479ac047bd44e
Reviewed-on: http://review.typo3.org/16921
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/class.db_list_extra.inc

index 83de4c7..e9b142e 100644 (file)
@@ -672,6 +672,24 @@ class localRecordList extends recordList {
 
                        $theIcon = $this->clickMenuEnabled ? $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg,$table,$row['uid']) : $iconImg;
 
+                       // Have labels respect possible itemsProcFunc results
+                       /** @var $formEngine t3lib_TCEforms */
+                       $formEngine = t3lib_div::makeInstance('t3lib_TCEForms');
+                       if(isset($GLOBALS['TCA'][$table]['columns'])) {
+                               foreach($GLOBALS['TCA'][$table]['columns'] as $field => $fieldSetup) {
+                                       if(isset($fieldSetup['config']['itemsProcFunc'])) {
+                                               $GLOBALS['TCA'][$table]['columns'][$field]['config']['items'] = $formEngine->procItems(
+                                                       $fieldSetup['config']['items'],
+                                                       $fieldSetup['config']['itemsProcFunc'],
+                                                       $fieldSetup['config'],
+                                                       $table,
+                                                       $row,
+                                                       $field
+                                               );
+                                       }
+                               }
+                       }
+
                                // Preparing and getting the data-array
                        $theData = Array();
                        foreach($this->fieldArray as $fCol)     {