From 317e0a6810e8262651f9caa56fe04be3cb75bc80 Mon Sep 17 00:00:00 2001 From: DannyS712 Date: Wed, 24 Jun 2020 00:41:11 +0000 Subject: [PATCH] Hooks: Update to use `DifferenceEngineViewHeader` Bug: T255769 Change-Id: I9b8f0359c3478fe1c028b47756d88062c2abcec8 --- extension.json | 2 +- includes/ThanksHooks.php | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/extension.json b/extension.json index d2ad7866..aff7b175 100644 --- a/extension.json +++ b/extension.json @@ -178,7 +178,7 @@ "BeforePageDisplay": "ThanksHooks::onBeforePageDisplay", "BeforeSpecialMobileDiffDisplay": "ThanksHooks::onBeforeSpecialMobileDiffDisplay", "DiffTools": "ThanksHooks::insertThankLink", - "DiffViewHeader": "ThanksHooks::onDiffViewHeader", + "DifferenceEngineViewHeader": "ThanksHooks::onDifferenceEngineViewHeader", "EchoGetBundleRules": "ThanksHooks::onEchoGetBundleRules", "EchoGetDefaultNotifiedUsers": "ThanksHooks::onEchoGetDefaultNotifiedUsers", "GetLogTypesOnUser": "ThanksHooks::onGetLogTypesOnUser", diff --git a/includes/ThanksHooks.php b/includes/ThanksHooks.php index ebc3f503..5ac32c5f 100644 --- a/includes/ThanksHooks.php +++ b/includes/ThanksHooks.php @@ -170,13 +170,11 @@ class ThanksHooks { } /** - * Handler for DiffViewHeader hook. - * @see https://www.mediawiki.org/wiki/Manual:Hooks/DiffViewHeader + * Handler for DifferenceEngineViewHeader hook. + * @see https://www.mediawiki.org/wiki/Manual:Hooks/DifferenceEngineViewHeader * @param DifferenceEngine $diff DifferenceEngine object that's calling. - * @param Revision $oldRev Revision object of the "old" revision (may be null/invalid) - * @param Revision $newRev Revision object of the "new" revision */ - public static function onDiffViewHeader( $diff, $oldRev, $newRev ) { + public static function onDifferenceEngineViewHeader( $diff ) { if ( $diff->getUser()->isLoggedIn() ) { static::addThanksModule( $diff->getOutput() ); }