Revert "Adding a bunch of hooks from wikiHow into DifferenceEngine"
[lhc/web/wiklou.git] / includes / api / ApiQueryUserInfo.php
index 0fc443a..d3cd0c4 100644 (file)
@@ -24,6 +24,8 @@
  * @file
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Query module to get information about the currently logged-in user
  *
@@ -225,7 +227,8 @@ class ApiQueryUserInfo extends ApiQueryBase {
                }
 
                if ( isset( $this->prop['unreadcount'] ) ) {
-                       $unreadNotifications = WatchedItemStore::getDefaultInstance()->countUnreadNotifications(
+                       $store = MediaWikiServices::getInstance()->getWatchedItemStore();
+                       $unreadNotifications = $store->countUnreadNotifications(
                                $user,
                                self::WL_UNREAD_LIMIT
                        );