[BUGFIX] includeCSS is not compressed and concatenated 47/41747/2
authorSebastian Michaelsen <sebastian@michaelsen.io>
Sat, 18 Jul 2015 11:13:53 +0000 (13:13 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Mon, 20 Jul 2015 17:51:52 +0000 (19:51 +0200)
The CSS files defined in page.includeCSSLibs don't get concatenated and
compressed if you enable config.compressCss and config.concatenateCss

Resolves: #65772
Releases: master, 6.2
Change-Id: I7bb72de5308dd255ff0b20f13b65d80e4a23d5cb
Reviewed-on: http://review.typo3.org/41747
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
typo3/sysext/core/Classes/Page/PageRenderer.php

index f875a00..08a455a 100644 (file)
@@ -2674,6 +2674,7 @@ class PageRenderer implements \TYPO3\CMS\Core\SingletonInterface {
                                // use external concatenation routine
                                $params = array(
                                        'cssFiles' => &$this->cssFiles,
+                                       'cssLibs' => &$this->cssLibs,
                                        'headerData' => &$this->headerData,
                                        'footerData' => &$this->footerData
                                );
@@ -2683,6 +2684,7 @@ class PageRenderer implements \TYPO3\CMS\Core\SingletonInterface {
                                if (TYPO3_MODE === 'BE') {
                                        $cssOptions = array('baseDirectories' => $GLOBALS['TBE_TEMPLATE']->getSkinStylesheetDirectories());
                                }
+                               $this->cssLibs = $this->getCompressor()->concatenateCssFiles($this->cssLibs, $cssOptions);
                                $this->cssFiles = $this->getCompressor()->concatenateCssFiles($this->cssFiles, $cssOptions);
                        }
                }
@@ -2705,17 +2707,18 @@ class PageRenderer implements \TYPO3\CMS\Core\SingletonInterface {
         */
        protected function doCompressCss() {
                if ($this->compressCss) {
-                       // Use external compression routine
-                       $params = array(
-                               'cssInline' => &$this->cssInline,
-                               'cssFiles' => &$this->cssFiles,
-                               'headerData' => &$this->headerData,
-                               'footerData' => &$this->footerData
-                       );
                        if (!empty($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['cssCompressHandler'])) {
-                               // use external concatenation routine
+                               // Use external compression routine
+                               $params = array(
+                                       'cssInline' => &$this->cssInline,
+                                       'cssFiles' => &$this->cssFiles,
+                                       'cssLibs' => &$this->cssLibs,
+                                       'headerData' => &$this->headerData,
+                                       'footerData' => &$this->footerData
+                               );
                                GeneralUtility::callUserFunction($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['cssCompressHandler'], $params, $this);
                        } else {
+                               $this->cssLibs = $this->getCompressor()->compressCssFiles($this->cssLibs);
                                $this->cssFiles = $this->getCompressor()->compressCssFiles($this->cssFiles);
                        }
                }