Merge "Hooks: Update to use DifferenceEngineViewHeader"

This commit is contained in:
jenkins-bot 2020-06-24 18:08:00 +00:00 committed by Gerrit Code Review
commit 35126a705b
2 changed files with 4 additions and 6 deletions

View file

@ -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",

View file

@ -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() );
}