mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
Provide cookie workaround for setting the feature flag
This is a convenient way to propagate alternate configuration during browser testing. Bug: T270240 Change-Id: Ica6399c53499be7f930e8d13b838ad265b66cdf4
This commit is contained in:
parent
1ea61ad2aa
commit
88fd6a4e28
|
@ -54,7 +54,11 @@ class CodeMirrorHooks {
|
|||
public static function onResourceLoaderGetConfigVars( array &$vars ) {
|
||||
/** @var Config $config */
|
||||
$config = MediaWikiServices::getInstance()->getMainConfig();
|
||||
$vars['wgCodeMirrorEnableBracketMatching'] = $config->get( 'CodeMirrorEnableBracketMatching' );
|
||||
|
||||
$vars['wgCodeMirrorEnableBracketMatching'] = $config->get( 'CodeMirrorEnableBracketMatching' )
|
||||
// Allows tests to override the configuration.
|
||||
|| RequestContext::getMain()->getRequest()
|
||||
->getCookie( '-codemirror-bracket-matching-test', 'mw' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue