Don't use VE on non-wikitext pages

Bug: 47456
Change-Id: Iae6510f661feedec181fd8697d799353edb5eac8
This commit is contained in:
Krenair 2013-05-11 22:14:08 +01:00
parent da4ddbc4d9
commit 4f7859895b

View file

@ -31,7 +31,9 @@ class VisualEditorHooks {
in_array( $skin->getTitle()->getNamespace(), $wgVisualEditorNamespaces ) ||
// Special page action for an article in the VisualEditor namespace
in_array( $skin->getRelevantTitle()->getNamespace(), $wgVisualEditorNamespaces )
)
) &&
// Only use VisualEditor if the page is wikitext, not CSS/JS
$skin->getTitle()->getContentModel() === CONTENT_MODEL_WIKITEXT
) {
$output->addModules( array( 'ext.visualEditor.viewPageTarget' ) );
}