dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "SpecialMovepage: Convert form to use OOUI controls"
[lhc/web/wiklou.git]
/
includes
/
resourceloader
/
ResourceLoader.php
diff --git
a/includes/resourceloader/ResourceLoader.php
b/includes/resourceloader/ResourceLoader.php
index
cecb6a2
..
b8ec63b
100644
(file)
--- 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 );
}
// Defaults
$options += array( 'cache' => true, 'cacheReport' => false );
+ $stats = RequestContext::getMain()->getStats();
// Don't filter empty content
if ( trim( $data ) === '' ) {
// 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 ) ) {
$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 {
return $cacheEntry;
}
$result = '';
try {
- $stats = RequestContext::getMain()->getStats();
$statStart = microtime( true );
$statStart = microtime( true );
-
$result = self::applyFilter( $filter, $data, $this->config );
$result = self::applyFilter( $filter, $data, $this->config );
-
$statTiming = microtime( true ) - $statStart;
$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 */";
}
if ( $options['cacheReport'] ) {
$result .= "\n/* cache key: $key */";
}
@@
-1486,9
+1485,7
@@
MESSAGE;
$query = self::createLoaderQuery( $context, $extraQuery );
$script = $this->getLoadScript( $source );
$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
);
$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' ) );
$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;
}
return $less;
}