Merge "Drop wgCodeEditorEnableCore, default on, pointless to disable"

This commit is contained in:
jenkins-bot 2019-07-18 15:28:50 +00:00 committed by Gerrit Code Review
commit e09b486175
2 changed files with 6 additions and 13 deletions

View file

@ -31,9 +31,6 @@
"i18n"
]
},
"config": {
"CodeEditorEnableCore": true
},
"DefaultUserOptions": {
"usecodeeditor": 1
},

View file

@ -8,16 +8,12 @@ class CodeEditorHooks {
* @return null|string
*/
public static function getPageLanguage( Title $title, $model, $format ) {
global $wgCodeEditorEnableCore;
if ( $wgCodeEditorEnableCore ) {
if ( $model === CONTENT_MODEL_JAVASCRIPT ) {
return 'javascript';
} elseif ( $model === CONTENT_MODEL_CSS ) {
return 'css';
} elseif ( $model === CONTENT_MODEL_JSON ) {
return 'json';
}
if ( $model === CONTENT_MODEL_JAVASCRIPT ) {
return 'javascript';
} elseif ( $model === CONTENT_MODEL_CSS ) {
return 'css';
} elseif ( $model === CONTENT_MODEL_JSON ) {
return 'json';
}
// Give extensions a chance