Project

General

Profile

Task #32758 ยป 32758.diff

Steffen Gebert, 2011-12-21 19:03

View differences:

t3lib/class.t3lib_compressor.php
* @return array CSS files
*/
public function concatenateCssFiles(array $cssFiles, array $options = array()) {
$cache = $GLOBALS['typo3CacheManager']->getCache('cache_hash');
$identifier = sha1(serialize($cssFiles) . serialize($options));
$result = $cache->get($identifier);
if ($result === FALSE) {
$result = self::concatenateCssFilesWorker($cssFiles, $options);
$cache->set($identifier, $result);
}
return $result;
}
/**
* Concatenates the Stylesheet files
*
* Options:
* baseDirectories If set, only include files below one of the base directories
*
* @param array $cssFiles CSS files to process
* @param array $options Additional options
* @return array CSS files
*/
protected function concatenateCssFilesWorker(array $cssFiles, array $options = array()) {
$filesToInclude = array();
foreach ($cssFiles as $key => $fileOptions) {
// no concatenation allowed for this file, so continue
......
* @return array JS files
*/
public function concatenateJsFiles(array $jsFiles) {
$cache = $GLOBALS['typo3CacheManager']->getCache('cache_hash');
$identifier = sha1(serialize($jsFiles));
$result = $cache->get($identifier);
if ($result === FALSE) {
$result = self::concatenateJsFilesWorker($jsFiles);
$cache->set($identifier, $result);
}
return $result;
}
/**
* Concatenates the JavaScript files
*
* @param array $jsFiles JavaScript files to process
* @return array JS files
*/
protected function concatenateJsFilesWorker(array $jsFiles) {
$filesToInclude = array();
foreach ($jsFiles as $key => $fileOptions) {
// invalid section found or no concatenation allowed, so continue
    (1-1/1)