From ed5cabcb0e25a93d440ef9930e370c4b494be890 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 7 May 2023 03:01:29 +0200 Subject: [PATCH] Replace deprecated Hooks::run Bug: T335536 Change-Id: Ic7f758fc4f65e364aa23b218e5e62a47f1641d8e --- includes/Hooks.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index 517bf65e2..a7a13d9ad 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -15,7 +15,6 @@ use EchoSeenTime; use EchoServices; use EmailNotification; use ExtensionRegistry; -use Hooks as MWHooks; use HTMLCheckMatrix; use LinksUpdate; use LogEntry; @@ -197,7 +196,7 @@ class Hooks implements $wgEnableUserEmail; // allow extensions to define their own event - MWHooks::run( 'BeforeCreateEchoEvent', + MediaWikiServices::getInstance()->getHookContainer()->run( 'BeforeCreateEchoEvent', [ &$wgEchoNotifications, &$wgEchoNotificationCategories, &$wgEchoNotificationIcons ] ); // Only allow mention status notifications when enabled @@ -1363,7 +1362,7 @@ class Hooks implements // notifications for talk page messages, disable the new messages alert. if ( $user->isRegistered() && isset( $wgEchoNotifications['edit-user-talk'] ) - && MWHooks::run( 'EchoCanAbortNewMessagesAlert' ) + && MediaWikiServices::getInstance()->getHookContainer()->run( 'EchoCanAbortNewMessagesAlert' ) ) { // hide new messages alert return false;