Revision::newNullRevision: Make sure the Title is set in the constructor
authorKunal Mehta <legoktm@gmail.com>
Sat, 1 Aug 2015 00:00:48 +0000 (17:00 -0700)
committerKunal Mehta <legoktm@gmail.com>
Sat, 1 Aug 2015 00:00:48 +0000 (17:00 -0700)
commite84868d256d50bccd8bf2419b21d8eb9a4c33342
tree22ce5f5cd19915d0c71c30719829a65f5b13a4e4
parente48fec5a8ab5916735849d420f2dfeec7eb0fced
Revision::newNullRevision: Make sure the Title is set in the constructor

Revision::__construct() calls Revision::getContentModel() to initialize
the 'content_model' field. If a Title object is not set, it will try to
look up the page in the slave database, which might be behind. At that
point it will default to wikitext, which is problematic during imports.

By passing the Title object in the constructor instead of afterwards,
the content model should be intialized properly.

Bug: T91170
Change-Id: I7fea996ea5b723967272af8cb344150aea10bb54
includes/Revision.php