[TYPO3-core] FYI: small cleanup in tslib

Oliver Hader oliver at typo3.org
Sat Mar 1 14:40:22 CET 2008


Hi Dmitry,

Dmitry Dulepov [typo3] schrieb:
> Hi!
> 
> Committed small cleanup in tslib:
> - unitialized variable usage in USER and COA functions inside 
> tslib_cObj. This is a copy/paste error (from PHP_SCRIPT), which was 
> around for ages. Despite bad practice of using unitialized variable, it 
> also prevented admin panel from displaying correct include file for 
> USER_INT/COA_INT. This was the only usage of 'file' parameter for 
> COA_INT/USER_INT
> - added @var in tslib_fe where INT objects are handled
> 
> The changes are so trivial that I took liberty to commit them to 4.2.

Thanks for the changes! But... ;)

+ /* @var $INTiS_cObj tslib_cObj */

Shouldn't that be "@var <datatype> <optional description>"? [1]
  					$GLOBALS['TSFE']->config[$ext.'incScript'][$substKey] = array(
-					'file'=>$incFile,
+					'file' => $conf['includeLibs'],

This means that it was also wrong in earlier TYYPO3 releases (4.1, 4.0, 
...)? I'm not sure if the 'file' key is required there at all. It was 
only used for the objects PHP_SCRIPT/~_EXT/~_INT to include one single 
file. And 'includeLibs' is a list of files.
The only occurrence for USER_INT/COA_INT of the 'file' key is in 
tslib_fe::INTincScript_process() for logging in time track:
$GLOBALS['TT']->push('Include '.$INTiS_config[$INTiS_key]['file'],'');

olly

[1] 
http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.var.pkg.html
-- 
Oliver Hader
TYPO3 Core Team


More information about the TYPO3-team-core mailing list