diff options
Diffstat (limited to 'includes/cache/ResourceFileCache.php')
-rw-r--r-- | includes/cache/ResourceFileCache.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/includes/cache/ResourceFileCache.php b/includes/cache/ResourceFileCache.php index 55da52c5..6d26a2d5 100644 --- a/includes/cache/ResourceFileCache.php +++ b/includes/cache/ResourceFileCache.php @@ -40,7 +40,9 @@ class ResourceFileCache extends FileCacheBase { public static function newFromContext( ResourceLoaderContext $context ) { $cache = new self(); - if ( $context->getOnly() === 'styles' ) { + if ( $context->getImage() ) { + $cache->mType = 'image'; + } elseif ( $context->getOnly() === 'styles' ) { $cache->mType = 'css'; } else { $cache->mType = 'js'; @@ -69,7 +71,8 @@ class ResourceFileCache extends FileCacheBase { // Get all query values $queryVals = $context->getRequest()->getValues(); foreach ( $queryVals as $query => $val ) { - if ( $query === 'modules' || $query === 'version' || $query === '*' ) { + if ( in_array( $query, array( 'modules', 'image', 'variant', 'version', '*' ) ) ) { + // Use file cache regardless of the value of this parameter continue; // note: &* added as IE fix } elseif ( $query === 'skin' && $val === $wgDefaultSkin ) { continue; @@ -79,6 +82,8 @@ class ResourceFileCache extends FileCacheBase { continue; } elseif ( $query === 'debug' && $val === 'false' ) { continue; + } elseif ( $query === 'format' && $val === 'rasterized' ) { + continue; } return false; |