X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWatchlist.php;h=58cde7e55ab8ed562bc004520a3a96939615c35f;hb=4e618302d9e7b96c008d3dfa3c0554cff52d5222;hp=15691f2c467b44708da76017a93ea47eca9b91ce;hpb=46d982949a32cd6ca3c013d75b110590650769cd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 15691f2c46..58cde7e55a 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.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. @@ -365,7 +367,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { if ( $this->getConfig()->get( 'RCShowWatchingUsers' ) && $user->getOption( 'shownumberswatching' ) ) { - $watchedItemStore = WatchedItemStore::getDefaultInstance(); + $watchedItemStore = MediaWikiServices::getInstance()->getWatchedItemStore(); } $s = $list->beginRecentChangesList(); @@ -646,7 +648,8 @@ class SpecialWatchlist extends ChangesListSpecialPage { * @return int */ protected function countItems() { - $count = WatchedItemStore::getDefaultInstance()->countWatchedItems( $this->getUser() ); + $store = MediaWikiServices::getInstance()->getWatchedItemStore(); + $count = $store->countWatchedItems( $this->getUser() ); return floor( $count / 2 ); } }