[TYPO3-dev] secure downloads - css_styled_content > Ernesto, please comment <

Georg Schönweger georg.schoenweger at gmail.com
Wed Jul 6 17:36:22 CEST 2011


Hi Ernesto,

Am 06.07.2011 17:18, schrieb Ernesto Baschny [cron IT]:
> The bug is that css_styled_content doesn't call
> $GLOBALS['TSFE']->includeTCA() before running t3lib_div::loadTCA().
> The "ext_tables.php" are *not* loaded by default at all on the
> FE-environment, so that your additions to it won't be ever considered.
>
> This is documented in loadTCA():
>
>     * For complete TCA use $GLOBALS['TSFE']->includeTCA() instead.
>
> In class.tx_cssstyledcontent_pi1.php, changing:
>
>     t3lib_div::loadTCA('tt_content');
>
> with:
>
>     $GLOBALS['TSFE']->includeTCA();
>
> Seems to do the trick. It adds some performance penalty to it, because
> it will load the TCA for "every" extension. Which is fine, because any
> extension might want to add additional fields for tt_content.
>
> Please test it, and give me your feedbacks, and we might want to push
> this change to gerrit (please report the bug in the issue tracker).

great, this works for me :) Should i create the bug report at
http://forge.typo3.org/projects/show/typo3v4-core and provide a patch file?

.. documentation of function includeTCA():
     * Includes TCA definitions from loaded extensions (ext_table.php
files).
     * Normally in the frontend only a part of the global $TCA array is
loaded,
     * namely the "ctrl" part. Thus it doesn't take up too much memory.
To load
     * full TCA for the table, use t3lib_div::loadTCA($tableName) after
calling
     * this function.

.. so it should should be:
$GLOBALS['TSFE']->includeTCA();
t3lib_div::loadTCA('tt_content');

right?

>
> Cheers,
> Ernesto
regards,
Georg
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev




More information about the TYPO3-dev mailing list