Project

General

Profile

Bug #39891 ยป class.t3lib_compressor.php.patch

Tomasz Krawczyk, 2012-08-17 15:35

View differences:

class.t3lib_compressor.php Fri Aug 17 15:19:46 2012
public function compressCssFile($filename) {
// generate the unique name of the file
$filenameAbsolute = t3lib_div::resolveBackPath($this->rootPath . $this->getFilenameFromMainDir($filename));
$unique = $filenameAbsolute . filemtime($filenameAbsolute) . filesize($filenameAbsolute);
if( file_exists($filenameAbsolute) )
$unique = $filenameAbsolute . filemtime($filenameAbsolute) . filesize($filenameAbsolute);
else
$unique = $filename . strval( rand(0, 100000) );
$pathinfo = pathinfo($filename);
$targetFile = $this->targetDirectory . $pathinfo['filename'] . '-' . md5($unique) . '.css';
......
public function compressJsFile($filename) {
// generate the unique name of the file
$filenameAbsolute = t3lib_div::resolveBackPath($this->rootPath . $this->getFilenameFromMainDir($filename));
$unique = $filenameAbsolute . filemtime($filenameAbsolute) . filesize($filenameAbsolute);
if( file_exists($filenameAbsolute) )
$unique = $filenameAbsolute . filemtime($filenameAbsolute) . filesize($filenameAbsolute);
else
$unique = $filename . strval( rand(0, 100000) );
$pathinfo = pathinfo($filename);
$targetFile = $this->targetDirectory . $pathinfo['filename'] . '-' . md5($unique) . '.js';
    (1-1/1)