[BUGFIX] Re-enable creation of compressed CSS files 02/47002/4
authorMichiel Roos <michiel@maxserv.com>
Wed, 2 Mar 2016 21:46:59 +0000 (22:46 +0100)
committerAndreas Wolf <andreas.wolf@typo3.org>
Thu, 3 Mar 2016 12:10:51 +0000 (13:10 +0100)
The change of #73611 prevents compressed CSS files from being created.

Resolves: #73986
Related: #73611
Releases: master
Change-Id: I83e9f77d91be0189ac692deb204f15d55098d5da
Reviewed-on: https://review.typo3.org/47002
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Michiel Roos <michiel@maxserv.com>
Tested-by: Michiel Roos <michiel@maxserv.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jonas Götze <jonnsn@gmail.com>
Tested-by: Jonas Götze <jonnsn@gmail.com>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
typo3/sysext/core/Classes/Resource/ResourceCompressor.php

index d1c1800..d67be13 100644 (file)
@@ -353,7 +353,7 @@ class ResourceCompressor
         $pathinfo = PathUtility::pathinfo($filenameAbsolute);
         $targetFile = $this->targetDirectory . $pathinfo['filename'] . '-' . md5($unique) . '.css';
         // only create it, if it doesn't exist, yet
-        if (!file_exists($filenameAbsolute) || $this->createGzipped && !file_exists($filenameAbsolute . '.gzip')) {
+        if (!file_exists(PATH_site . $targetFile) || $this->createGzipped && !file_exists(PATH_site . $targetFile . '.gzip')) {
             $contents = $this->compressCssString(GeneralUtility::getUrl($filenameAbsolute));
             if (strpos($filename, $this->targetDirectory) === false) {
                 $contents = $this->cssFixRelativeUrlPaths($contents, PathUtility::dirname($filename) . '/');