[TYPO3-core] RFC: Bug 6138: Recursive include of external Typoscript Files
Franz Holzinger
franz at fholzinger.com
Tue Aug 14 07:40:21 CEST 2007
Hello Michael,
> Solution:
> Only one line of code has to be changed in class.t3lib_tsparser,php to enable
> recursive inclusion. See included patch.
>
> Comments:
> - patch was written by Martin Ficzel
>
> Branches: Trunk only
I would prefer to have an error hint here also in the return.
function checkIncludeLines($string, $cycle_counter=1) {
if ($cycle_counter>100) {
t3lib_div::sysLog('It appears like TypoScript code is looping over itself.
Check your templates for "<INCLUDE_TYPOSCRIPT: ..." tags','Core',2);
return FALSE;
}
So the caller could check the return value.
To see the recursion better I would prefer to have self::checkIncludeLines
used.
$included_text =
t3lib_TSparser::checkIncludeLines(t3lib_div::getUrl($filename),$cycle_counte
r+1);
This should be moved into the if block or the 2 nested ifs could be merged.
$comment = $arr[$key.'..'];
Because this variable $comment won't be needed outside.
- Franz
More information about the TYPO3-team-core
mailing list