mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeEditor
synced 2024-11-15 03:23:45 +00:00
Merge "Drop wgCodeEditorEnableCore, default on, pointless to disable"
This commit is contained in:
commit
e09b486175
|
@ -31,9 +31,6 @@
|
||||||
"i18n"
|
"i18n"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"config": {
|
|
||||||
"CodeEditorEnableCore": true
|
|
||||||
},
|
|
||||||
"DefaultUserOptions": {
|
"DefaultUserOptions": {
|
||||||
"usecodeeditor": 1
|
"usecodeeditor": 1
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,16 +8,12 @@ class CodeEditorHooks {
|
||||||
* @return null|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public static function getPageLanguage( Title $title, $model, $format ) {
|
public static function getPageLanguage( Title $title, $model, $format ) {
|
||||||
global $wgCodeEditorEnableCore;
|
if ( $model === CONTENT_MODEL_JAVASCRIPT ) {
|
||||||
|
return 'javascript';
|
||||||
if ( $wgCodeEditorEnableCore ) {
|
} elseif ( $model === CONTENT_MODEL_CSS ) {
|
||||||
if ( $model === CONTENT_MODEL_JAVASCRIPT ) {
|
return 'css';
|
||||||
return 'javascript';
|
} elseif ( $model === CONTENT_MODEL_JSON ) {
|
||||||
} elseif ( $model === CONTENT_MODEL_CSS ) {
|
return 'json';
|
||||||
return 'css';
|
|
||||||
} elseif ( $model === CONTENT_MODEL_JSON ) {
|
|
||||||
return 'json';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give extensions a chance
|
// Give extensions a chance
|
||||||
|
|
Loading…
Reference in a new issue