[BUGFIX] Correct TCA inclusion for uploads rendering 18/17718/2
authorGeorg Ringer <georg.ringer@gmail.com>
Fri, 25 Jan 2013 18:49:26 +0000 (19:49 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Fri, 25 Jan 2013 18:53:44 +0000 (19:53 +0100)
In the method that renders the uploads in css_styled_content
the call to load the TCA was replaced with its Frontend
counterpart to enable access to the configuration of custom
fields in tt_content.

Fixes: #44145
Branches: 4.5, 4.6, 4.7, 6.0, 6.1

Change-Id: I26f67fcfbf11db25c80ebe93ddd1e81167d828a9
Reviewed-on: https://review.typo3.org/17716
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-on: https://review.typo3.org/17717
Reviewed-on: https://review.typo3.org/17718

typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php

index 55b6bec..1baa00c 100755 (executable)
@@ -298,7 +298,7 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                                        // Get the list of files from the field
                                $field = (trim($conf['field']) ? trim($conf['field']) : 'media');
                                $fileList = $this->cObj->data[$field];
-                               t3lib_div::loadTCA('tt_content');
+                               $GLOBALS['TSFE']->includeTCA();
                                $path = 'uploads/media/';
                                if (is_array($GLOBALS['TCA']['tt_content']['columns'][$field]) && !empty($GLOBALS['TCA']['tt_content']['columns'][$field]['config']['uploadfolder'])) {
                                        // in TCA-Array folders are saved without trailing slash, so $path.$fileName won't work