From 7b5bc9905ed3632403ed1696df6ddfc957fba752 Mon Sep 17 00:00:00 2001 From: ZabeMath <35405030+ZabeMath@users.noreply.github.com> Date: Mon, 15 Mar 2021 22:26:02 +0100 Subject: [PATCH] Avoid using User::clearAllUserNotifications User::clearAllUserNotifications is hard deprecated since 1.35 and should be replaced with WatchlistNotificationManager::clearAllUserNotifications() --- includes/SpecialUsersWatchList.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/SpecialUsersWatchList.php b/includes/SpecialUsersWatchList.php index 2dd0840..6d61cd5 100644 --- a/includes/SpecialUsersWatchList.php +++ b/includes/SpecialUsersWatchList.php @@ -21,6 +21,8 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; + /** * A special page that lists last changes made to the wiki, * limited to user-defined list of titles. @@ -69,7 +71,7 @@ function execute( $subpage ) { && $request->getVal( 'reset' ) && $request->wasPosted() ) { - $user->clearAllNotifications(); + MediaWikiServices::getInstance()->getWatchlistNotificationManager()->clearAllUserNotifications( $user ); $output->redirect( $this->getPageTitle()->getFullURL( $opts->getChangedValues() ) ); return;