X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoader.php;h=b8ec63bb299998afa35721de02f703742e1e723b;hb=9e06b91a743b9f27a726c923bd48f32a0c1d5a11;hp=090c4fda9fb19a78c5f88ba5aa40d1bae9298f09;hpb=8a6548ee452ef08cec6248fbf4e215be812088b2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 090c4fda9f..b8ec63bb29 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -191,6 +191,7 @@ class ResourceLoader implements LoggerAwareInterface { } // Defaults $options += array( 'cache' => true, 'cacheReport' => false ); + $stats = RequestContext::getMain()->getStats(); // Don't filter empty content if ( trim( $data ) === '' ) { @@ -211,17 +212,16 @@ class ResourceLoader implements LoggerAwareInterface { $cache = wfGetCache( wfIsHHVM() ? CACHE_ACCEL : CACHE_ANYTHING ); $cacheEntry = $cache->get( $key ); if ( is_string( $cacheEntry ) ) { - wfIncrStats( "resourceloader_cache.$filter.hit" ); + $stats->increment( "resourceloader_cache.$filter.hit" ); return $cacheEntry; } $result = ''; try { - $stats = RequestContext::getMain()->getStats(); $statStart = microtime( true ); - $result = self::applyFilter( $filter, $data, $this->config ); - - $stats->timing( "resourceloader_cache.$filter.miss", microtime( true ) - $statStart ); + $statTiming = microtime( true ) - $statStart; + $stats->increment( "resourceloader_cache.$filter.miss" ); + $stats->timing( "resourceloader_cache.$filter.timing", 1000 * $statTiming ); if ( $options['cacheReport'] ) { $result .= "\n/* cache key: $key */"; } @@ -1485,9 +1485,7 @@ MESSAGE; $query = self::createLoaderQuery( $context, $extraQuery ); $script = $this->getLoadScript( $source ); - // Prevent the IE6 extension check from being triggered (bug 28840) - // by appending a character that's invalid in Windows extensions ('*') - return wfExpandUrl( wfAppendQuery( $script, $query ) . '&*', PROTO_RELATIVE ); + return wfExpandUrl( wfAppendQuery( $script, $query ), PROTO_RELATIVE ); } /** @@ -1515,9 +1513,7 @@ MESSAGE; $only, $printable, $handheld, $extraQuery ); - // Prevent the IE6 extension check from being triggered (bug 28840) - // by appending a character that's invalid in Windows extensions ('*') - return wfExpandUrl( wfAppendQuery( $wgLoadScript, $query ) . '&*', PROTO_RELATIVE ); + return wfExpandUrl( wfAppendQuery( $wgLoadScript, $query ), PROTO_RELATIVE ); } /** @@ -1629,9 +1625,6 @@ MESSAGE; $less->setPreserveComments( true ); $less->setVariables( self::getLessVars( $config ) ); $less->setImportDir( $config->get( 'ResourceLoaderLESSImportPaths' ) ); - foreach ( $config->get( 'ResourceLoaderLESSFunctions' ) as $name => $func ) { - $less->registerFunction( $name, $func ); - } return $less; }