[BUGFIX] Repair f:image VH for Backend 29/26729/4
authorStefan Froemken <froemken@gmail.com>
Thu, 9 Jan 2014 21:24:13 +0000 (22:24 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 20 Jan 2014 07:20:33 +0000 (08:20 +0100)
ImageMagick command was executed from directory
typo3/, but output file is relative and starts
with typo3temp.
This patch adds absolute path to output file
when in BE mode.

Resolves: #54886
Releases: 6.2
Change-Id: I6216a9bb74b9619c090c1ef70322cb6788a73c92
Reviewed-on: https://review.typo3.org/26729
Reviewed-by: Oliver Klee
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Marcin S?gol
Tested-by: Marcin S?gol
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php

index c3617bc..4e73065 100644 (file)
@@ -2270,7 +2270,8 @@ class GraphicalFunctions {
                                }
                                // Making the temporary filename:
                                $this->createTempSubDir('pics/');
-                               $output = $this->absPrefix . $this->tempPath . 'pics/' . $this->filenamePrefix . $theOutputName . '.' . $newExt;
+                               $relativeOutputPath = $this->tempPath . 'pics/' . $this->filenamePrefix . $theOutputName . '.' . $newExt;
+                               $output = (TYPO3_MODE === 'BE') ? PATH_site . $relativeOutputPath: $this->absPrefix . $relativeOutputPath;
                                // Register temporary filename:
                                $GLOBALS['TEMP_IMAGES_ON_PAGE'][] = $output;
                                if ($this->dontCheckForExistingTempFile || !$this->file_exists_typo3temp_file($output, $imagefile)) {