Merge "Split out doBlockLevels() into its own class"
[lhc/web/wiklou.git] / includes / Title.php
index 7887890..65b2d3a 100644 (file)
@@ -23,6 +23,8 @@
  */
 use MediaWiki\Linker\LinkTarget;
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Represents a title within MediaWiki.
  * Optionally may contain an interwiki designation or namespace.
@@ -4438,7 +4440,8 @@ class Title implements LinkTarget {
                        $this->mNotificationTimestamp = [];
                }
 
-               $watchedItem = WatchedItemStore::getDefaultInstance()->getWatchedItem( $user, $this );
+               $store = MediaWikiServices::getInstance()->getWatchedItemStore();
+               $watchedItem = $store->getWatchedItem( $user, $this );
                if ( $watchedItem ) {
                        $this->mNotificationTimestamp[$uid] = $watchedItem->getNotificationTimestamp();
                } else {