[BUGFIX] Correct TCA inclusion for uploads rendering 50/17250/2
authorAlexander Stehlik <alexander.stehlik@googlemail.com>
Thu, 20 Dec 2012 10:08:03 +0000 (11:08 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Fri, 25 Jan 2013 14:12:26 +0000 (15:12 +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/17250
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php

index 0c828d3..93ae4bb 100644 (file)
@@ -267,7 +267,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                // Get the list of files from the field
                                $field = trim($conf['field']) ? trim($conf['field']) : 'media';
                                $fileList = $this->cObj->data[$field];
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::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