From 996587e228e71436dc4bf2bceb41ce5a94e9288c Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sun, 10 Sep 2017 15:13:07 -0700 Subject: [PATCH] ApiQueryWatchlist: Don't reinvent Title::newFromLinkTarget() Change-Id: I1591c517ad8325e7c249197e6601fcc3d3efcc99 --- includes/api/ApiQueryWatchlist.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index 2ab85240d8..318247599b 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -260,10 +260,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. */ -- 2.20.1