[FEATURE] TypoScript: Allow relative file inclusion 42/23842/6
authorPhilipp Gampe <philipp.gampe@typo3.org>
Sun, 15 Sep 2013 16:35:03 +0000 (18:35 +0200)
committerPhilipp Gampe <philipp.gampe@typo3.org>
Tue, 15 Oct 2013 07:48:29 +0000 (09:48 +0200)
commit0f607c857bd4535c6fffc4d7b1e76014b24f0751
tree25b93f595d5f289a6f9d5a64a37597d4df4f6998
parent3358d32e75d426473ff1be4b2a9a492e8175a98b
[FEATURE] TypoScript: Allow relative file inclusion

Allows to pass relative paths to INCLUDE_TYPOSCRIPT if the inclusion
is called recursively from a file.
Those paths start with ./ or ../
The ./ is needed to distinguish them from paths relative to PATH_SITE.

Adds a new utility function to PathUtility that does the actual
resolving. The utility function ships with a unit test.

This allows simple nested TypoScript templates that can be moved or
copied without the need to adapt all includes.
Relative paths will also remain unchanged between loading/saving.

Besides this the patch now also keeps "optional properties"
given in an include-tag for FILE unchanged. So far this only
worked for DIR.

Resolves: #52018
Documentation: #52832
Releases: 6.2
Change-Id: Icfb828152076ad285bd145f55f2aabcea89c50d0
Reviewed-on: https://review.typo3.org/23842
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php
typo3/sysext/core/Classes/Utility/PathUtility.php
typo3/sysext/core/Tests/Unit/Utility/PathUtilityTest.php