* Fixed bug #15395: Code cleanup for t3lib_compressor
authorBernhard Kraft <kraftb@think-open.at>
Tue, 10 Aug 2010 09:29:53 +0000 (09:29 +0000)
committerBernhard Kraft <kraftb@think-open.at>
Tue, 10 Aug 2010 09:29:53 +0000 (09:29 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8546 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_compressor.php

index 7312eb9..359eabf 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-10  Bernhard Kraft  <kraftb@think-open.at>
+
+       * Fixed bug #15395: Code cleanup for t3lib_compressor
+
 2010-08-09  Steffen Kamper  <steffen@typo3.org>
 
        * Follow-up to bug #15079: Add XCLASS-definitions to spritemanager classes
index e9226aa..08ca58e 100644 (file)
@@ -60,7 +60,7 @@ class t3lib_Compressor {
                        $this->createGzipped = TRUE;
                                // $compressionLevel can also be TRUE
                        if (t3lib_div::testInt($compressionLevel)) {
-                               $this->gzipCompressionLevel = $compressionLevel;
+                               $this->gzipCompressionLevel = intval($compressionLevel);
                        }
                }
        }
@@ -354,11 +354,7 @@ class t3lib_Compressor {
 
                if ($this->createGzipped) {
                                // create compressed version
-                       $compressionLevel = -1;
-                       if (isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['compressionLevel']) && is_numeric($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['compressionLevel'])) {
-                               $compressionLevel = intval($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['compressionLevel']);
-                       }
-                       t3lib_div::writeFile(PATH_site . $filename . '.gzip', gzencode($contents, $compressionLevel));
+                       t3lib_div::writeFile(PATH_site . $filename . '.gzip', gzencode($contents, $this->gzipCompressionLevel));
                }
        }