From ce1cfd6a0e2219bbf979d20aace0a79e55d20c57 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 20 May 2013 12:55:52 -0400 Subject: [PATCH] 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 --- CodeEditor.hooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeEditor.hooks.php b/CodeEditor.hooks.php index 5fc9a096..1e0cd30c 100644 --- a/CodeEditor.hooks.php +++ b/CodeEditor.hooks.php @@ -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() ) )