Revision: Interpret a NULL rev_content_model as the default model
authorKunal Mehta <legoktm@gmail.com>
Thu, 2 Jul 2015 07:40:40 +0000 (00:40 -0700)
committerKunal Mehta <legoktm@gmail.com>
Thu, 2 Jul 2015 07:40:40 +0000 (00:40 -0700)
commita5bc9f49cd01e49cb78924686c7f35b03f45d8ea
tree904a73b4b0cb7dc9f28392dad2dcfc7078b7cd8e
parent9668611c4a83a55b62ce26a3d89b861af491ffd5
Revision: Interpret a NULL rev_content_model as the default model

If a revision using the default content model is saved, the
rev_content_model field will be set to NULL in order to save space.
However, Revision::getContentModel() was using Title::getContentModel()
when it found a NULL, which will return the current content model rather
than the default. So change that to use the default content model, as
returned by ContentHandler::getDefaultModelFor() rather than the current
one.

Change-Id: I7011812b6b131170b3c593917ad263bcba83898d
includes/Revision.php