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:
Brad Jorsch 2013-05-20 12:55:52 -04:00 committed by Anomie
parent b802deafbf
commit ce1cfd6a0e

View file

@ -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() ) )