mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
Set default for 'usecodemirror' preference
This preferably would be set to on by default so that the extension works out of the box, but it causes tests to fail in Core (T286623). Despite the previous state of CodeMirrorHooks::onGetPreferences(), CodeMirror was never on by default anyway. Bug: T286270 Change-Id: Ic702b868b55aaa8ab71ddedd289c25f36b34b112
This commit is contained in:
parent
daeaae012c
commit
f7ef01b412
|
@ -165,6 +165,9 @@
|
|||
"localBasePath": "resources",
|
||||
"remoteExtPath": "CodeMirror/resources"
|
||||
},
|
||||
"DefaultUserOptions": {
|
||||
"usecodemirror": 0
|
||||
},
|
||||
"QUnitTestModule": {
|
||||
"localBasePath": "",
|
||||
"remoteExtPath": "CodeMirror",
|
||||
|
|
|
@ -76,11 +76,10 @@ class CodeMirrorHooks {
|
|||
* @param array &$defaultPreferences
|
||||
*/
|
||||
public static function onGetPreferences( User $user, array &$defaultPreferences ) {
|
||||
// CodeMirror is enabled by default for users. It can
|
||||
// be changed by adding '$wgDefaultUserOptions['usecodemirror'] = 0;' into LocalSettings.php
|
||||
// CodeMirror is disabled by default for all users. It can enabled for everyone
|
||||
// by default by adding '$wgDefaultUserOptions['usecodemirror'] = 1;' into LocalSettings.php
|
||||
$defaultPreferences['usecodemirror'] = [
|
||||
'type' => 'api',
|
||||
'default' => '1',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue