[TYPO3-dev] Is the description of tslib_fe::includeTCA wrong?

Dmitry Dulepov [typo3] dmitry at typo3.org
Sat Sep 6 10:15:13 CEST 2008


Hi!

I just noticed that description of this function says:
====================
Includes full TCA.
Normally in the frontend only a part of the global $TCA array is loaded, for instance the "ctrl" part. Thus it doesn't take up too much memory.
If you need the FULL TCA available for some reason (like plugins using it) you should call this function which will include the FULL TCA.
Global vars $TCA, $PAGES_TYPES, $LANG_GENERAL_LABELS can/will be affected.
The flag $this->TCAloaded will make sure that such an inclusion happens only once since; If $this->TCAloaded is set, nothing is included.
====================

It appears that this description is historical and does not describe what the function does now. Here is what it actually does:
====================
if (!$this->TCAloaded) {
  $TCA = Array();
  include (TYPO3_tables_script ? PATH_typo3conf.TYPO3_tables_script : PATH_t3lib.'stddb/tables.php');
    // Extension additions
  if ($GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE']) {
    include(PATH_typo3conf.$GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE'].'_ext_tables.php');
  } else {
    include(PATH_t3lib.'stddb/load_ext_tables.php');
  }
    // ext-script
  if (TYPO3_extTableDef_script)	{
    include (PATH_typo3conf.TYPO3_extTableDef_script);
  }
  $this->TCAloaded = $TCAloaded;
}
====================

So, it only loads ext_tables.php from each extension and does not load dynamic configuration file (tca.php).

Can anyone confirm that I am not blind and the description is wrong? If yes, I will change it to reflect the real life.

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/




More information about the TYPO3-dev mailing list