Merge "Hooks: Update to use DifferenceEngineViewHeader"

This commit is contained in:
jenkins-bot 2020-06-24 18:08:03 +00:00 committed by Gerrit Code Review
commit 645ce6e38f
2 changed files with 3 additions and 9 deletions

View file

@ -184,7 +184,7 @@
"Hooks": {
"BeforePageDisplay": "VisualEditorHooks::onBeforePageDisplay",
"SkinEditSectionLinks": "VisualEditorHooks::onSkinEditSectionLinks",
"DiffViewHeader": "VisualEditorHooks::onDiffViewHeader",
"DifferenceEngineViewHeader": "VisualEditorHooks::onDifferenceEngineViewHeader",
"GetBetaFeaturePreferences": "VisualEditorHooks::onGetBetaPreferences",
"GetPreferences": "VisualEditorHooks::onGetPreferences",
"PreferencesFormPreSave": "VisualEditorHooks::onPreferencesFormPreSave",

View file

@ -99,18 +99,12 @@ class VisualEditorHooks {
}
/**
* Handler for the DiffViewHeader hook, to add visual diffs code as configured
* Handler for the DifferenceEngineViewHeader hook, to add visual diffs code as configured
*
* @param DifferenceEngine $diff The difference engine
* @param Revision|null $oldRev The old revision
* @param Revision|null $newRev The new revision
* @return void
*/
public static function onDiffViewHeader(
DifferenceEngine $diff,
Revision $oldRev = null,
Revision $newRev = null
) {
public static function onDifferenceEngineViewHeader( DifferenceEngine $diff ) {
$veConfig = MediaWikiServices::getInstance()->getConfigFactory()
->makeConfig( 'visualeditor' );
$output = RequestContext::getMain()->getOutput();