summaryrefslogtreecommitdiff
path: root/includes/resourceloader/ResourceLoaderContext.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/resourceloader/ResourceLoaderContext.php')
-rw-r--r--includes/resourceloader/ResourceLoaderContext.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/includes/resourceloader/ResourceLoaderContext.php b/includes/resourceloader/ResourceLoaderContext.php
index dd69bb01..0e96c6c8 100644
--- a/includes/resourceloader/ResourceLoaderContext.php
+++ b/includes/resourceloader/ResourceLoaderContext.php
@@ -1,5 +1,7 @@
<?php
/**
+ * Context for resource loader modules.
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -39,6 +41,7 @@ class ResourceLoaderContext {
protected $only;
protected $version;
protected $hash;
+ protected $raw;
/* Methods */
@@ -62,6 +65,7 @@ class ResourceLoaderContext {
$this->debug = $request->getFuzzyBool( 'debug', $wgResourceLoaderDebug );
$this->only = $request->getVal( 'only' );
$this->version = $request->getVal( 'version' );
+ $this->raw = $request->getFuzzyBool( 'raw' );
$skinnames = Skin::getSkinNames();
// If no skin is specified, or we don't recognize the skin, use the default skin
@@ -157,7 +161,7 @@ class ResourceLoaderContext {
$this->direction = $this->request->getVal( 'dir' );
if ( !$this->direction ) {
# directionality based on user language (see bug 6100)
- $this->direction = Language::factory( $this->language )->getDir();
+ $this->direction = Language::factory( $this->getLanguage() )->getDir();
}
}
return $this->direction;
@@ -201,6 +205,13 @@ class ResourceLoaderContext {
/**
* @return bool
*/
+ public function getRaw() {
+ return $this->raw;
+ }
+
+ /**
+ * @return bool
+ */
public function shouldIncludeScripts() {
return is_null( $this->only ) || $this->only === 'scripts';
}