[BUGFIX] Set absPrefix of GraphicalFunctions to PATH_site 52/23652/4
authorHelmut Hummel <helmut.hummel@typo3.org>
Fri, 6 Sep 2013 09:12:58 +0000 (11:12 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Tue, 21 Jan 2014 15:00:05 +0000 (16:00 +0100)
To make GifBuilder and GraphicalFunctions work in
backend context, it is needed to set the absolute
path prefix for processed images to document root.

It works in FE context, because the current working
directory of PHP is document root, but fails in
BE context, as the CWD can be anything, depending
on the location of the executing script.

Set absPrefix to PATH_site in FAL crop scale mask
helper so that the FAL file processing can be used
in BE context.

Resolves: #51804
Releases: 6.0, 6.1, 6.2
Change-Id: I824333dc6f6cff4286d9eefb20c045e5bb207658
Reviewed-on: https://review.typo3.org/23652
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel

index 7769e84..9cb0663 100644 (file)
@@ -66,6 +66,7 @@ class LocalCropScaleMaskHelper {
                /** @var $gifBuilder \TYPO3\CMS\Frontend\Imaging\GifBuilder */
                $gifBuilder = Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Imaging\\GifBuilder');
+               $gifBuilder->absPrefix = PATH_site;
                $configuration = $targetFile->getProcessingConfiguration();
                $configuration['additionalParameters'] = $this->modifyImageMagickStripProfileParameters($configuration['additionalParameters'], $configuration);