Merge "SpecialMovepage: Convert form to use OOUI controls"
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoader.php
index cecb6a2..b8ec63b 100644 (file)
@@ -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;
        }