Only enable VisualDiff on VE-supported content models

Change-Id: I71ea11aaed207c4f67cfd69455b90d87e5f14498
This commit is contained in:
Ed Sanders 2017-07-18 23:09:04 +01:00
parent 8baf524006
commit 602b8b7782

View file

@ -92,6 +92,11 @@ class VisualEditorHooks {
return; return;
} }
$veConfig = ConfigFactory::getDefaultInstance()->makeConfig( 'visualeditor' );
if ( !ApiVisualEditor::isAllowedContentType( $veConfig, $diff->getTitle()->getContentModel() ) ) {
return;
}
$output->addModuleStyles( [ $output->addModuleStyles( [
'ext.visualEditor.diffPage.init.styles', 'ext.visualEditor.diffPage.init.styles',
'oojs-ui.styles.icons-alerts', 'oojs-ui.styles.icons-alerts',