X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoader.php;h=b8ec63bb299998afa35721de02f703742e1e723b;hp=cecb6a2706886871ef57e14e33b3491ff11f6c91;hb=f8659ae6ea90d7bc8ce28bfc1caa56153878836f;hpb=586effc0b7a0307ded8a7a587adca44b9b3febf9 diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index cecb6a2706..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,18 +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 ); - $statTiming = microtime( true ) - $statStart; - $stats->timing( "resourceloader_cache.$filter.miss", 1000 * $statTiming ); + $stats->increment( "resourceloader_cache.$filter.miss" ); + $stats->timing( "resourceloader_cache.$filter.timing", 1000 * $statTiming ); if ( $options['cacheReport'] ) { $result .= "\n/* cache key: $key */"; } @@ -1486,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 ); } /** @@ -1516,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 ); } /** @@ -1630,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; }