Bug #24690 ยป 17175.diff
t3lib/class.t3lib_compressor.php (Arbeitskopie) | ||
---|---|---|
// default compression level is -1
|
||
protected $gzipCompressionLevel = -1;
|
||
protected $htaccessTemplate = '<FilesMatch "\.(js|css)(\.gzip)?$">
|
||
<IfModule mod_expires.c>
|
||
ExpiresActive on
|
||
ExpiresDefault "access plus 7 days"
|
||
</IfModule>
|
||
FileETag MTime Size
|
||
</FilesMatch>';
|
||
/**
|
||
* Constructor
|
||
*/
|
||
... | ... | |
t3lib_div::mkdir(PATH_site . $this->targetDirectory);
|
||
}
|
||
// check whether .htaccess exists
|
||
$htaccessPath = PATH_site . $this->targetDirectory . '.htaccess';
|
||
if (!file_exists($htaccessPath)) {
|
||
t3lib_div::writeFile($htaccessPath, $this->htaccessTemplate);
|
||
}
|
||
// decide whether we should create gzipped versions or not
|
||
$compressionLevel = $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['compressionLevel'];
|
||
// we need zlib for gzencode()
|