Maintain the page ID in WikiPage instead of relying on Title
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 24 Jan 2013 19:43:15 +0000 (20:43 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 21 Feb 2013 07:30:15 +0000 (08:30 +0100)
commitc80efe3218c54f0b6fdc971e4a4ffb9ba390df1a
treeb92c8de93ef60167937d7b6bd08cba4b0953dab8
parent7013da720b4682ad1d550bbe3d01dc4ff3209e8c
Maintain the page ID in WikiPage instead of relying on Title

Also updated WikiPage methods to use it instead of calling Title's
methods directly.

This allows to win a database query for most web requests because
Action::factory() calls WikiPage::getActionOverrides() which will
call exists() through getContentHandler() and getContentModel().
This call to exists() trigerred the object's load from the database,
but this only affected the Title object, so WikiPage needed to load
itself from the database too.
Now this call to exists() will load the WikiPage object, which
populates the LinkCache too.

Change-Id: Iea16d6726ddc2356a25011fed9f2a8dbae3b7b42
includes/WikiPage.php