[TYPO3-core] RFC: Bug 6138: Recursive include of external Typoscript Files

Oliver Hader oh at inpublica.de
Tue Aug 14 19:25:48 CEST 2007


Hi Michael,

Michael Stucki schrieb:
> Problem:
> Currently it is not possible to use more than one level of external ts-files 
> because the parser is not checking the included scripts for includes. So teh 
> use of external ts is not possible in larger projects with a lot of ts code. 
> 
> 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
> 
> Bugtracker reference:
> http://bugs.typo3.org/view.php?id=6138

I've added a small change to the patch for the ping-pong recursions. I
removed the $cycle_counter and inserted a class variable $includedFiles
as an array. This variable holds all files that were included. So, if a
file that was already included should be included once more, it isn't
processed at all and the log is written.

One more possibility to $includedFiles would be store the name of the
file or the page-id with the TypoScript that caused the error of the
double inclusion. So, developers and admins don't have to search in all
includable TypoScript files or in the whole database, but have the
information were the bug appeared.

But besides these possible extensions to the patch, I've tested yours
and can confirm that more than one "INCLUDE_TYPOSCRIPT" is recognized
and that endless-loops are detected.

So, +1 from my side. Maybe you'd also like to approve my suggestions...


olly
-- 
Oliver Hader
http://inpublica.de/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug_6138_v2.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070814/27f91840/attachment.txt 


More information about the TYPO3-team-core mailing list