The startup module varies by skin, so it should be possible for
consumers of the ResourceLoaderGetConfigVars hook to know what
skin it being requested.
Bug: T186062
Change-Id: I97d6b4bc245bc64ff148c3665b46116b8a6be409
ResourceLoaderStartUpModule::getConfigSettings(). Use this to export static
configuration variables to JavaScript. Things that depend on the current page
or request state must be added through MakeGlobalVariablesScript instead.
ResourceLoaderStartUpModule::getConfigSettings(). Use this to export static
configuration variables to JavaScript. Things that depend on the current page
or request state must be added through MakeGlobalVariablesScript instead.
+Skin is made available for skin specific config.
&$vars: [ variable name => value ]
&$vars: [ variable name => value ]
'ResourceLoaderJqueryMsgModuleMagicWords': Called in
ResourceLoaderJqueryMsgModule to allow adding magic words for jQueryMsg.
'ResourceLoaderJqueryMsgModuleMagicWords': Called in
ResourceLoaderJqueryMsgModule to allow adding magic words for jQueryMsg.
$oldCommentSchema = $conf->get( 'CommentTableSchemaMigrationStage' ) === MIGRATION_OLD;
// Build list of variables
$oldCommentSchema = $conf->get( 'CommentTableSchemaMigrationStage' ) === MIGRATION_OLD;
// Build list of variables
+ $skin = $context->getSkin();
$vars = [
'wgLoadScript' => wfScript( 'load' ),
'debug' => $context->getDebug(),
$vars = [
'wgLoadScript' => wfScript( 'load' ),
'debug' => $context->getDebug(),
- 'skin' => $context->getSkin(),
'stylepath' => $conf->get( 'StylePath' ),
'wgUrlProtocols' => wfUrlProtocols(),
'wgArticlePath' => $conf->get( 'ArticlePath' ),
'stylepath' => $conf->get( 'StylePath' ),
'wgUrlProtocols' => wfUrlProtocols(),
'wgArticlePath' => $conf->get( 'ArticlePath' ),
'wgCommentCodePointLimit' => $oldCommentSchema ? null : CommentStore::COMMENT_CHARACTER_LIMIT,
];
'wgCommentCodePointLimit' => $oldCommentSchema ? null : CommentStore::COMMENT_CHARACTER_LIMIT,
];
- Hooks::run( 'ResourceLoaderGetConfigVars', [ &$vars ] );
+ Hooks::run( 'ResourceLoaderGetConfigVars', [ &$vars, $skin ] );