(bug 45417) Remove resetArticleID() call from RecentChanges::getTitle()
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 26 Feb 2013 15:33:13 +0000 (16:33 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 26 Feb 2013 15:33:13 +0000 (16:33 +0100)
commitfc6a9635fb3863feb0cbcd5a08a4ce455bfe13e0
tree23c551886a98952cfaedffded932a8d24cda5243
parent78271824d2085591a43d3a7b9410614a2fd10d9d
(bug 45417) Remove resetArticleID() call from RecentChanges::getTitle()

This is doing more harm than good; see I489c406f (4769f44) for a similar issue.

The problem is that if resetArticleID() get called with a strictly positive value
when the page does not exist, getArticleID() will return that value indicating that
the page exists, but the LinkCache will return null for complementary fields, causing
the exception mentionned in the bug.
By removing the resetArticleID() call, the ID will get loaded from the LinkCache, and
thus the whole Title object is in a consistent state.
Since a LinkBatch is already executed for those titles from Special:Recentchanges and
Special:Watchlist, this will not increase the number of database queries for those
special pages (and even lowers it from what I saw on my development wiki).

Change-Id: I8742cce46908ce8eb3fee55c1b6e458732b1ebd7
includes/RecentChange.php