summaryrefslogtreecommitdiff
path: root/includes/resourceloader/ResourceLoaderUserTokensModule.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/resourceloader/ResourceLoaderUserTokensModule.php')
-rw-r--r--includes/resourceloader/ResourceLoaderUserTokensModule.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/resourceloader/ResourceLoaderUserTokensModule.php b/includes/resourceloader/ResourceLoaderUserTokensModule.php
index 6d787c50..92ebbe93 100644
--- a/includes/resourceloader/ResourceLoaderUserTokensModule.php
+++ b/includes/resourceloader/ResourceLoaderUserTokensModule.php
@@ -35,10 +35,9 @@ class ResourceLoaderUserTokensModule extends ResourceLoaderModule {
/**
* Fetch the tokens for the current user.
*
- * @param $context ResourceLoaderContext: Context object
- * @return Array: List of tokens keyed by token type
+ * @return array: List of tokens keyed by token type
*/
- protected function contextUserTokens( ResourceLoaderContext $context ) {
+ protected function contextUserTokens() {
global $wgUser;
return array(
@@ -54,7 +53,9 @@ class ResourceLoaderUserTokensModule extends ResourceLoaderModule {
*/
public function getScript( ResourceLoaderContext $context ) {
return Xml::encodeJsCall( 'mw.user.tokens.set',
- array( $this->contextUserTokens( $context ) ) );
+ array( $this->contextUserTokens() ),
+ ResourceLoader::inDebugMode()
+ );
}
/**