Merge "Fix a few minor mistakes in PHPDoc tags"
[lhc/web/wiklou.git] / includes / api / ApiQueryWatchlist.php
index 2ab8524..1e3b2c7 100644 (file)
@@ -34,6 +34,7 @@ use MediaWiki\MediaWikiServices;
  */
 class ApiQueryWatchlist extends ApiQueryGeneratorBase {
 
+       /** @var CommentStore */
        private $commentStore;
 
        public function __construct( ApiQuery $query, $moduleName ) {
@@ -260,10 +261,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
 
        private function extractOutputData( WatchedItem $watchedItem, array $recentChangeInfo ) {
                /* Determine the title of the page that has been changed. */
-               $title = Title::makeTitle(
-                       $watchedItem->getLinkTarget()->getNamespace(),
-                       $watchedItem->getLinkTarget()->getDBkey()
-               );
+               $title = Title::newFromLinkTarget( $watchedItem->getLinkTarget() );
                $user = $this->getUser();
 
                /* Our output data. */