OutputPage: Support foreign module sources in makeResourceLoaderLink
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderContext.php
index 63ec5de..8994c0e 100644 (file)
@@ -27,7 +27,6 @@
  * of a specific loader request
  */
 class ResourceLoaderContext {
-
        /* Protected Members */
 
        protected $resourceLoader;
@@ -109,7 +108,8 @@ class ResourceLoaderContext {
        }
 
        /**
-        * Return a dummy ResourceLoaderContext object suitable for passing into things that don't "really" need a context
+        * Return a dummy ResourceLoaderContext object suitable for passing into
+        * things that don't "really" need a context.
         * @return ResourceLoaderContext
         */
        public static function newDummyContext() {
@@ -208,21 +208,21 @@ class ResourceLoaderContext {
         * @return bool
         */
        public function shouldIncludeScripts() {
-               return is_null( $this->only ) || $this->only === 'scripts';
+               return is_null( $this->getOnly() ) || $this->getOnly() === 'scripts';
        }
 
        /**
         * @return bool
         */
        public function shouldIncludeStyles() {
-               return is_null( $this->only ) || $this->only === 'styles';
+               return is_null( $this->getOnly() ) || $this->getOnly() === 'styles';
        }
 
        /**
         * @return bool
         */
        public function shouldIncludeMessages() {
-               return is_null( $this->only ) || $this->only === 'messages';
+               return is_null( $this->getOnly() ) || $this->getOnly() === 'messages';
        }
 
        /**
@@ -231,8 +231,8 @@ class ResourceLoaderContext {
        public function getHash() {
                if ( !isset( $this->hash ) ) {
                        $this->hash = implode( '|', array(
-                               $this->getLanguage(), $this->getDirection(), $this->skin, $this->user,
-                               $this->debug, $this->only, $this->version
+                               $this->getLanguage(), $this->getDirection(), $this->getSkin(), $this->getUser(),
+                               $this->getDebug(), $this->getOnly(), $this->getVersion()
                        ) );
                }
                return $this->hash;