Optimise WikiPage::newFromID() to load all the data in one database query.
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 17 Apr 2012 11:13:57 +0000 (13:13 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 17 Apr 2012 19:08:29 +0000 (21:08 +0200)
commit658ae44bd13978a00820431887a21e8527709808
tree85ec5e07df266cae4d2d28fdf495402ee3f4e125
parent8f40375984a52f828efcdc3123beed1bf06d7a2f
Optimise WikiPage::newFromID() to load all the data in one database query.

* Separated the last part of WikiPage::loadPageData() into loadFromRow() to put database access and object loading into separate methods (and also for consistency with other classes)
* Added WikiPage::newFromRow() to be able to get a WikiPage object from an already-existing database row
* Modified WikiPage::newFromID() to do a single database request to get all the necessary data and make it use the new newFromRow() method

Change-Id: I2db423f2dba10cc3db4f4b2e7a7b9d99cd114f33
includes/WikiPage.php