[BUGFIX] Unify PATH_thisScript with PATH_site 95/52295/13
authorHelmut Hummel <typo3@helhum.io>
Fri, 31 Mar 2017 13:16:47 +0000 (15:16 +0200)
committerHelmut Hummel <typo3@helhum.io>
Mon, 3 Apr 2017 12:37:42 +0000 (14:37 +0200)
commit1a861b7a38316112c8a6c5bc11d323566c846c65
treefba9673c594299d1ac7d986d92bf2bb482b6a80f
parent1ad24af28c80c0a09767c7a79c3f3295582f6122
[BUGFIX] Unify PATH_thisScript with PATH_site

In case we accept TYPO3_PATH_ROOT from the environment,
we must ensure that all paths (in particular the entry script path)
are based on this base path.

We do so, by removing the calculated path prefix with
the base path injected from the environment.

We cannot rely on paths using DIRECTORY_SEPARATOR as this depends on how
the Apache and the DocumentRoot are configured. This patch converts all
paths using forward slashes before any calculation is done.

Resolves: #80634
Releases: master
Change-Id: I3edecadb2f82e763ad414cf23a7048bac7c85556
Reviewed-on: https://review.typo3.org/52295
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
Tested-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Steffen Frese <steffenf14@gmail.com>
Tested-by: Steffen Frese <steffenf14@gmail.com>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
Tested-by: Tobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Thomas Maroschik <tmaroschik@dfau.de>
Tested-by: Thomas Maroschik <tmaroschik@dfau.de>
Reviewed-by: Kai Ole Hartwig <mail@ole-hartwig.eu>
Tested-by: Kai Ole Hartwig <mail@ole-hartwig.eu>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Helmut Hummel <typo3@helhum.io>
typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php