Mass conversion of $wgContLang to service
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderModule.php
index 609abb8..3bf309d 100644 (file)
@@ -129,9 +129,8 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
         * @return bool
         */
        public function getFlip( $context ) {
-               global $wgContLang;
-
-               return $wgContLang->getDir() !== $context->getDirection();
+               return MediaWikiServices::getInstance()->getContentLanguage()->getDir() !==
+                       $context->getDirection();
        }
 
        /**
@@ -347,7 +346,7 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
         * Note: It is expected that $context will be made non-optional in the near
         * future.
         *
-        * @param ResourceLoaderContext $context
+        * @param ResourceLoaderContext|null $context
         * @return array List of module names as strings
         */
        public function getDependencies( ResourceLoaderContext $context = null ) {