[BUGFIX] Use getForLocalProcessing() for FAL images in GIFBUILDER 80/36180/3
authorTorben Hansen <derhansen@gmail.com>
Thu, 22 Jan 2015 19:03:01 +0000 (20:03 +0100)
committerBenjamin Mack <benni@typo3.org>
Thu, 29 Jan 2015 07:24:02 +0000 (08:24 +0100)
GIFBUILDER must use getForLocalProcessing() for FAL images, so
image processing is possible for files containing special
chars (e.g. umlauts) when using an UTF-8 filesystem.

Resolves: #64224
Releases: master, 6.2
Change-Id: Ib3b372ceea1afa839787c61a3f118b3f62f05dcc
Reviewed-on: http://review.typo3.org/36180
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/Imaging/GifBuilder.php

index c17b0e1..d243a5c 100644 (file)
@@ -212,13 +212,21 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
                                                        $fileInfo = $this->getResource($conf['file'], $conf['file.']);
                                                        if ($fileInfo) {
                                                                $this->combinedFileNames[] = preg_replace('/\\.[[:alnum:]]+$/', '', basename($fileInfo[3]));
-                                                               $this->setup[$theKey . '.']['file'] = $fileInfo[3];
+                                                               if ($fileInfo['originalFile'] instanceof \TYPO3\CMS\Core\Resource\File) {
+                                                                       $this->setup[$theKey . '.']['file'] = $fileInfo['originalFile']->getForLocalProcessing(FALSE);
+                                                               } else {
+                                                                       $this->setup[$theKey . '.']['file'] = $fileInfo[3];
+                                                               }
                                                                $this->setup[$theKey . '.']['BBOX'] = $fileInfo;
                                                                $this->objBB[$theKey] = $fileInfo;
                                                                if ($conf['mask']) {
                                                                        $maskInfo = $this->getResource($conf['mask'], $conf['mask.']);
                                                                        if ($maskInfo) {
-                                                                               $this->setup[$theKey . '.']['mask'] = $maskInfo[3];
+                                                                               if ($maskInfo['originalFile'] instanceof \TYPO3\CMS\Core\Resource\File) {
+                                                                                       $this->setup[$theKey . '.']['mask'] = $maskInfo['originalFile']->getForLocalProcessing(FALSE);
+                                                                               } else {
+                                                                                       $this->setup[$theKey . '.']['mask'] = $maskInfo[3];
+                                                                               }
                                                                        } else {
                                                                                $this->setup[$theKey . '.']['mask'] = '';
                                                                        }