Tried to make it so that I can read this code without going insane, by replacing...
[lhc/web/wiklou.git] / includes / ResourceLoaderContext.php
index ff0e810..269712a 100644 (file)
@@ -26,7 +26,6 @@ class ResourceLoaderContext {
        /* Protected Members */
 
        protected $request;
-       protected $server;
        protected $modules;
        protected $language;
        protected $direction;
@@ -34,6 +33,7 @@ class ResourceLoaderContext {
        protected $user;
        protected $debug;
        protected $only;
+       protected $version;
        protected $hash;
 
        /* Methods */
@@ -50,6 +50,7 @@ class ResourceLoaderContext {
                $this->user = $request->getVal( 'user' );
                $this->debug = $request->getBool( 'debug' ) && $request->getVal( 'debug' ) === 'true';
                $this->only = $request->getVal( 'only' );
+               $this->version = $request->getVal( 'version' );
 
                // Fallback on system defaults
                if ( !$this->language ) {
@@ -97,6 +98,10 @@ class ResourceLoaderContext {
                return $this->only;
        }
 
+       public function getVersion() {
+               return $this->version;
+       }
+
        public function shouldIncludeScripts() {
                return is_null( $this->only ) || $this->only === 'scripts';
        }
@@ -111,7 +116,8 @@ class ResourceLoaderContext {
 
        public function getHash() {
                return isset( $this->hash ) ?
-                       $this->hash : $this->hash =
-                               implode( '|', array( $this->language, $this->skin, $this->user, $this->debug, $this->only ) );
+                       $this->hash : $this->hash = implode( '|', array(
+                               $this->language, $this->direction, $this->skin, $this->user, $this->debug, $this->only, $this->version
+                       ) );
        }
-}
+}
\ No newline at end of file