Merge "Don't use VE on non-wikitext pages"

This commit is contained in:
jenkins-bot 2013-05-13 16:02:36 +00:00 committed by Gerrit Code Review
commit 04f73d268f

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' ) );
}