diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /includes/cache/ResourceFileCache.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
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; |