[TYPO3-core] RFC #14247: Add a compressor/concatenator for CSS and JS

Steffen Gebert steffen at steffen-gebert.de
Sat May 1 23:05:24 CEST 2010


Am 01.05.2010, 20:13 Uhr, schrieb Helmut Hummel <helmut at typo3.org>:

> so -1 for now.

Problem was that url() references in the merged version got adjusted for a  
second time during compression. This problem was only visible in  
installations with typo3 in a subdirectory (as once you are on / you can  
add as many ../ as you want.. you always stay at root level).

I changed
> // we have to fix relative paths, if we aren't working on a file in our  
> target directory
> if (is_int(strpos($filename, $this->targetDirectory))) {
>  $contents = $this->cssFixRelativeUrlPaths($contents, dirname($filename)  
> . '/');
> }
to
> if (!is_int(..)
which is the correct condition

compressCssFile() now also returns the file with trailing "../". Before it  
has been added in compressCssFiles() to the returns of compressCssFile(),  
but this made compressCssFile() standalone unusable. No it's also possible  
to use it for only one file.

v10 attached

Steffen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 14247_v10.diff
Type: text/x-diff
Size: 15659 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100501/beed0893/attachment-0001.diff>


More information about the TYPO3-team-core mailing list