* @param string $data Text to filter, such as JavaScript or CSS text
* @param array $options For back-compat, can also be the boolean value for "cacheReport". Keys:
* - (bool) cache: Whether to allow caching this data. Default: true.
- * - (bool) cacheReport: Whether to include the "cache key" report comment. Default: true.
+ * - (bool) cacheReport: Whether to include the "cache key" report comment. Default: false.
* @return string Filtered data, or a comment containing an error message
*/
public function filter( $filter, $data, $options = array() ) {
$options = array( 'cacheReport' => $options );
}
// Defaults
- $options += array( 'cache' => true, 'cacheReport' => true );
+ $options += array( 'cache' => true, 'cacheReport' => false );
// Don't filter empty content
if ( trim( $data ) === '' ) {
array( 'test.quux', ResourceLoaderModule::TYPE_SCRIPTS ),
"<script>window.RLQ = window.RLQ || []; window.RLQ.push( function () {\n"
. "mw.test.baz({token:123});mw.loader.state({\"test.quux\":\"ready\"});\n"
- . "\n} );</script>"
+ . "} );</script>"
),
// Load private module (combined)
array(
array( 'test.quux', ResourceLoaderModule::TYPE_COMBINED ),
"<script>window.RLQ = window.RLQ || []; window.RLQ.push( function () {\n"
. "mw.loader.implement(\"test.quux\",function($,jQuery){"
- . "mw.test.baz({token:123});},{\"css\":[\".mw-icon{transition:none}\\n"
- . "\"]});\n\n} );</script>"
+ . "mw.test.baz({token:123});},{\"css\":[\".mw-icon{transition:none}"
+ . "\"]});\n} );</script>"
),
// Load no modules
array(