Permalink
Browse files

Make the 2 logic work, for better transition

  • Loading branch information...
1 parent 420e0ff commit b9aad3d02aba892d028547fa1f95ac4d3c3fe1b5 @jdespatis committed Jan 30, 2012
Showing with 13 additions and 2 deletions.
  1. +11 −0 classes/ezjscpacker.php
  2. +2 −2 settings/ezjscore.ini
View
@@ -458,6 +458,17 @@ static function packFiles( $fileArray, $subPath = '', $fileExtension = '.js', $p
}
// Pack all files to save bandwidth
+
+ // CssOptimizer and JavascriptOptimizer are deprecated as of 4.7...
+ if ( $data['pack_level'] > 1 )
+ {
+ foreach( $ezjscINI->variable( 'eZJSCore', $isCSS ? 'CssOptimizer' : 'JavaScriptOptimizer' ) as $optimizer )
+ {
+ $content = call_user_func( array( $optimizer, 'optimize' ), $content, $data['pack_level'] );
+ }
+ }
+
+ // ... to the benefit of Event logic
$content = ezpEvent::getInstance()->filter( ( $isCSS ? 'optimize/css' : 'optimize/javascript' ),
$content,
$data['pack_level'] );
View
@@ -8,11 +8,11 @@
# Force packer level by setting integer from 0 to 3 instead of [dis|en]abled
#Packer=disabled
-# Not used anymore since 4.7, use site.ini [Event] Listeners[]=optimize/javascript@<callback> instead!
+# Deprecated as of 4.7, use site.ini [Event] Listeners[]=optimize/javascript@<callback> instead!
JavaScriptOptimizer[]
JavaScriptOptimizer[]=ezjscJavascriptOptimizer
-# Not used anymore since 4.7, use site.ini [Event] Listeners[]=optimize/css@<callback> instead!
+# Deprecated as of 4.7, use site.ini [Event] Listeners[]=optimize/css@<callback> instead!
CssOptimizer[]
CssOptimizer[]=ezjscCssOptimizer

0 comments on commit b9aad3d

Please sign in to comment.