Hooks: Update to use DifferenceEngineViewHeader

Bug: T255769
Change-Id: Ibd80adff646ef51814736716816a5574794dfb1a
This commit is contained in:
DannyS712 2020-06-24 00:43:27 +00:00
parent 6f6c4828a7
commit b69cf0217f
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();