Fixed bug #11996: Change compreed to compress with adding JS/CSS
authorSteffen Kamper <info@sk-typo3.de>
Fri, 18 Sep 2009 11:06:05 +0000 (11:06 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Fri, 18 Sep 2009 11:06:05 +0000 (11:06 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5975 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_pagerenderer.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php

index 46ab030..ecdba73 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
 
 2009-09-18  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #11996: Change compreed to compress with adding JS/CSS
        * Follow-up to bug #11985: Move ExtJs CSS-assignment to renderJsKibraries
        * Follow-up to bug #11985: backPath in FE is set too late
 
index 19a2982..1f38a65 100644 (file)
@@ -535,18 +535,18 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         * @param string $name
         * @param string $file
         * @param string $type
-        * @param boolean $compressed   flag if library is compressed
+        * @param boolean $compress             flag if library should be compressed
         * @param boolean $forceOnTop   flag if added library should be inserted at begin of this block
         * @param string $allWrap
         * @return void
         */
-       public function addJsLibrary($name, $file, $type = 'text/javascript', $compressed = TRUE, $forceOnTop = FALSE, $allWrap = '') {
+       public function addJsLibrary($name, $file, $type = 'text/javascript', $compress = FALSE, $forceOnTop = FALSE, $allWrap = '') {
                if (!in_array(strtolower($name), $this->jsLibs)) {
                        $this->jsLibs[strtolower($name)] = array (
                                'file'        => $file, 
                                'type'        => $type, 
                                'section'     => self::PART_HEADER,
-                               'compressed'  => $compressed
+                               'compress'    => $compress
                                'forceOnTop'  => $forceOnTop,
                                'allWrap'     => $allWrap
                        );
@@ -560,18 +560,18 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         * @param string $name
         * @param string $file
         * @param string $type
-        * @param boolean $compressed   flag if library is compressed
+        * @param boolean $compress     flag if library should be compressed
         * @param boolean $forceOnTop   flag if added library should be inserted at begin of this block
         * @param string $allWrap
         * @return void
         */
-       public function addJsFooterLibrary($name, $file, $type = 'text/javascript', $compressed = TRUE, $forceOnTop = FALSE, $allWrap = '') {
+       public function addJsFooterLibrary($name, $file, $type = 'text/javascript', $compress = FALSE, $forceOnTop = FALSE, $allWrap = '') {
                if (!in_array(strtolower($name), $this->jsLibs)) {
                        $this->jsLibs[strtolower($name)] = array (
                                'file'        => $file, 
                                'type'        => $type, 
                                'section'     => self::PART_FOOTER,
-                               'compressed'  => $compressed
+                               'compress'    => $compress
                                'forceOnTop'  => $forceOnTop,
                                'allWrap'     => $allWrap
                        );
@@ -584,17 +584,17 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         *
         * @param string $file
         * @param string $type
-        * @param boolean $compressed
+        * @param boolean $compress
         * @param boolean $forceOnTop
         * @param string $allWrap
         * @return void
         */
-       public function addJsFile($file, $type = 'text/javascript', $compressed = FALSE, $forceOnTop = FALSE, $allWrap = '') {
+       public function addJsFile($file, $type = 'text/javascript', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '') {
                if (!isset($this->jsFiles[$file])) {
                        $this->jsFiles[$file] = array (
                                'type'        => $type, 
                                'section'     => self::PART_HEADER, 
-                               'compressed'  => $compressed
+                               'compress'    => $compress
                                'forceOnTop'  => $forceOnTop, 
                                'allWrap'     => $allWrap
                        );
@@ -606,16 +606,16 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         *
         * @param string $file
         * @param string $type
-        * @param boolean $compressed
+        * @param boolean $compress
         * @param boolean $forceOnTop
         * @return void
         */
-       public function addJsFooterFile($file, $type = 'text/javascript', $compressed = FALSE, $forceOnTop = FALSE, $allWrap = '') {
+       public function addJsFooterFile($file, $type = 'text/javascript', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '') {
                if (!isset($this->jsFiles[$file])) {
                        $this->jsFiles[$file] = array (
                                'type'        => $type, 
                                'section'     => self::PART_FOOTER, 
-                               'compressed'  => $compressed
+                               'compress'    => $compress
                                'forceOnTop'  => $forceOnTop, 
                                'allWrap'     => $allWrap
                        );
@@ -629,16 +629,16 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         *
         * @param string $name
         * @param string $block
-        * @param boolean $compressed
+        * @param boolean $compress
         * @param boolean $forceOnTop
         * @return void
         */
-       public function addJsInlineCode($name, $block, $compressed = FALSE, $forceOnTop = FALSE) {
+       public function addJsInlineCode($name, $block, $compress = TRUE, $forceOnTop = FALSE) {
                if (!isset($this->jsInline[$name])) {
                        $this->jsInline[$name] = array (
                                'code'        => $block . chr(10),
                                'section'     => self::PART_HEADER, 
-                               'compressed'  => $compressed,
+                               'compress'    => $compress,
                                'forceOnTop'  => $forceOnTop
                        );
                }
@@ -649,16 +649,16 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         *
         * @param string $name
         * @param string $block
-        * @param boolean $compressed
+        * @param boolean $compress
         * @param boolean $forceOnTop
         * @return void
         */
-       public function addJsFooterInlineCode($name, $block, $compressed = FALSE, $forceOnTop = FALSE) {
+       public function addJsFooterInlineCode($name, $block, $compress = TRUE, $forceOnTop = FALSE) {
                if (!isset($this->jsInline[$name])) {
                        $this->jsInline[$name] = array (
                                'code'        => $block . chr(10),
                                'section'     => self::PART_FOOTER,
-                               'compressed'  => $compressed,
+                               'compress'    => $compress,
                                'forceOnTop'  => $forceOnTop
                        );
                }
@@ -685,13 +685,20 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         * @param string $rel
         * @param string $media
         * @param string $title
-        * @param boolean $compressed
+        * @param boolean $compress
         * @param boolean $forceOnTop
         * @return void
         */
-       public function addCssFile($file, $rel = 'stylesheet', $media = 'screen', $title = '', $compressed = FALSE, $forceOnTop = FALSE, $allWrap = '') {
+       public function addCssFile($file, $rel = 'stylesheet', $media = 'screen', $title = '', $compress = TRUE, $forceOnTop = FALSE, $allWrap = '') {
                if (!isset($this->cssFiles[$file])) {
-                       $this->cssFiles[$file] = array ('rel' => $rel, 'media' => $media, 'title' => $title, 'compressed' => $compressed, 'forceOnTop' => $forceOnTop, 'allWrap' => $allWrap);
+                       $this->cssFiles[$file] = array (
+                               'rel'        => $rel, 
+                               'media'      => $media, 
+                               'title'      => $title, 
+                               'compress'   => $compress, 
+                               'forceOnTop' => $forceOnTop, 
+                               'allWrap'    => $allWrap
+                       );
                }
        }
 
@@ -702,13 +709,17 @@ class t3lib_PageRenderer implements t3lib_Singleton {
         *
         * @param string $name
         * @param string $block
-        * @param boolean $compressed
+        * @param boolean $compress
         * @param boolean $forceOnTop
         * @return void
         */
        public function addCssInlineBlock($name, $block, $compressed = FALSE, $forceOnTop = FALSE) {
                if (!isset($this->cssInline[$name])) {
-                       $this->cssInline[$name] = array ('code' => $block, 'compressed' => $compressed, 'forceOnTop' => $forceOnTop);
+                       $this->cssInline[$name] = array (
+                               'code'       => $block, 
+                               'compress'   => $compress, 
+                               'forceOnTop' => $forceOnTop
+                       );
                }
        }
 
@@ -1254,7 +1265,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                        if ($this->compressJavascript) {
                                if (count($this->jsInline)) {
                                        foreach ($this->jsInline as $name => $properties) {
-                                               if (!$properties['compressed']) {
+                                               if ($properties['compress']) {
                                                        $error = '';
                                                        $this->jsInline[$name]['code'] = t3lib_div::minifyJavaScript($properties['code'], $error);
                                                        if ($error) {
index f471af6..ec99c4a 100644 (file)
@@ -538,7 +538,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                                                        $pageRenderer->addCssInlineBlock(
                                                                'import_' . $key, 
                                                                '@import url("' . htmlspecialchars($ss) . '") ' . htmlspecialchars($GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['media']) . ';', 
-                                                               $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['compressed'] ? TRUE : FALSE, 
+                                                               $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['compress'] ? TRUE : FALSE, 
                                                                $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['forceOnTop'] ? TRUE : FALSE, 
                                                                ''
                                                        );
@@ -548,7 +548,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                                                                $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['alternate'] ? 'alternate stylesheet' : 'stylesheet',
                                                                $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['media'] ? $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['media'] : 'screen', 
                                                                $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['title'] ? $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['title'] : '', 
-                                                               $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['compressed'] ? TRUE : FALSE, 
+                                                               $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['compress'] ? TRUE : FALSE, 
                                                                $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['forceOnTop'] ? TRUE : FALSE, 
                                                                $GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['allWrap']);
                                                
@@ -682,7 +682,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                                                htmlspecialchars($key), 
                                                htmlspecialchars($GLOBALS['TSFE']->absRefPrefix . $ss), 
                                                htmlspecialchars($type), 
-                                               $GLOBALS['TSFE']->pSetup['includeJSlibs.'][$key . '.']['compressed'] ? TRUE : FALSE, 
+                                               $GLOBALS['TSFE']->pSetup['includeJSlibs.'][$key . '.']['compress'] ? TRUE : FALSE, 
                                                $GLOBALS['TSFE']->pSetup['includeJSlibs.'][$key . '.']['forceOnTop'] ? TRUE : FALSE,
                                                $GLOBALS['TSFE']->pSetup['includeJSlibs.'][$key . '.']['allWrap']
                                        );
@@ -703,7 +703,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                                                htmlspecialchars($key), 
                                                htmlspecialchars($GLOBALS['TSFE']->absRefPrefix . $ss), 
                                                htmlspecialchars($type), 
-                                               $GLOBALS['TSFE']->pSetup['includeJSFooterlibs.'][$key . '.']['compressed'] ? TRUE : FALSE, 
+                                               $GLOBALS['TSFE']->pSetup['includeJSFooterlibs.'][$key . '.']['compress'] ? TRUE : FALSE, 
                                                $GLOBALS['TSFE']->pSetup['includeJSFooterlibs.'][$key . '.']['forceOnTop'] ? TRUE : FALSE,
                                                $GLOBALS['TSFE']->pSetup['includeJSFooterlibs.'][$key . '.']['allWrap']
                                        );
@@ -725,7 +725,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                                                $pageRenderer->addJsFile(
                                                        htmlspecialchars($GLOBALS['TSFE']->absRefPrefix . $ss), 
                                                        htmlspecialchars($type), 
-                                                       $GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['compressed'] ? TRUE : FALSE, 
+                                                       $GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['compress'] ? TRUE : FALSE, 
                                                        $GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['forceOnTop'] ? TRUE : FALSE, 
                                                        $GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['allWrap']
                                                );
@@ -746,7 +746,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                                                $pageRenderer->addJsFooterFile(
                                                        htmlspecialchars($GLOBALS['TSFE']->absRefPrefix . $ss), 
                                                        htmlspecialchars($type), 
-                                                       $GLOBALS['TSFE']->pSetup['includeFooterJS.'][$key . '.']['compressed'] ? TRUE : FALSE, 
+                                                       $GLOBALS['TSFE']->pSetup['includeFooterJS.'][$key . '.']['compress'] ? TRUE : FALSE, 
                                                        $GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['forceOnTop'] ? TRUE : FALSE, 
                                                        $GLOBALS['TSFE']->pSetup['includeJS.'][$key . '.']['allWrap']
                                                );