Fix meta=languageinfo usage example
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoader.php
index 2ae6d74..387e344 100644 (file)
@@ -118,11 +118,10 @@ class ResourceLoader implements LoggerAwareInterface {
                        return;
                }
                $dbr = wfGetDB( DB_REPLICA );
-               $skin = $context->getSkin();
                $lang = $context->getLanguage();
 
                // Batched version of ResourceLoaderModule::getFileDependencies
-               $vary = "$skin|$lang";
+               $vary = ResourceLoaderModule::getVary( $context );
                $res = $dbr->select( 'module_deps', [ 'md_module', 'md_deps' ], [
                                'md_module' => $moduleNames,
                                'md_skin' => $vary,
@@ -1721,10 +1720,10 @@ MESSAGE;
                // match the defaults assumed by ResourceLoaderContext.
                // Note: This relies on the defaults either being insignificant or forever constant,
                // as otherwise cached urls could change in meaning when the defaults change.
-               if ( $lang !== 'qqx' ) {
+               if ( $lang !== ResourceLoaderContext::DEFAULT_LANG ) {
                        $query['lang'] = $lang;
                }
-               if ( $skin !== 'fallback' ) {
+               if ( $skin !== ResourceLoaderContext::DEFAULT_SKIN ) {
                        $query['skin'] = $skin;
                }
                if ( $debug === true ) {