[TASK] Skip GeneralUtility::resolveBackPath() if its not necessary 97/27197/3
authorAndreas Wolf <andreas.wolf@typo3.org>
Fri, 31 Jan 2014 14:33:11 +0000 (15:33 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 31 Jan 2014 16:43:04 +0000 (17:43 +0100)
commitf59bdeaf766911f910e8db416debabe51e7bbf32
tree8ca8f2c4ec2523e3770c6072fd639f3ba50fc99e
parent1925ea03b0b4496f35c08df7c8496f117ea4bdd8
[TASK] Skip GeneralUtility::resolveBackPath() if its not necessary

resolveBackPath() is run a couple hundred times per script run,
especially in the backend. As this method is only really necessary in a
few special cases (when a path really contains "../"), we can skip it
for all other paths with an early return.

The check is really weak (it will not skip the call for things like
"/some/dir..with..dots..inbetween/"), but this is ok because we just use
it to skip all *really* obvious cases while at best not missing *any*
legitimate use-case, which should be achieved with this commit.

Change-Id: I4e7fbd2076323e682fcf66bc57605f817cd3e03c
Resolves: #55519
Releases: 6.2
Reviewed-on: https://review.typo3.org/27197
Reviewed-by: Jan Helke
Tested-by: Jan Helke
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Utility/GeneralUtility.php