mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeEditor
synced 2024-11-23 14:56:43 +00:00
Use CodeEditor for user css/js subpages
The test for $title->isCssJsSubpage() seems to have gotten lost in the refactoring in r110794, so enabling CodeEditor for core only affects the MediaWiki namespace. This restores that test, so user css/js subpages also get CodeEditor when $wgCodeEditorEnableCore is true. Change-Id: Id02825f922a1ed0aace7c9ffd940fe8d29bb5d79
This commit is contained in:
parent
b802deafbf
commit
ce1cfd6a0e
|
@ -5,7 +5,7 @@ class CodeEditorHooks {
|
|||
global $wgCodeEditorEnableCore;
|
||||
|
||||
// Try CSS/JS
|
||||
if( $wgCodeEditorEnableCore && $title->isCssOrJsPage() ) {
|
||||
if( $wgCodeEditorEnableCore && ( $title->isCssOrJsPage() || $title->isCssJsSubpage() ) ) {
|
||||
if( preg_match( '/\.js$/', $title->getText() ) )
|
||||
return 'javascript';
|
||||
if( preg_match( '/\.css$/', $title->getText() ) )
|
||||
|
|
Loading…
Reference in a new issue