Title::getContentModel(): load from DB if necessary
authorKevin Israel <pleasestand@live.com>
Wed, 20 Aug 2014 21:46:11 +0000 (17:46 -0400)
committerKevin Israel <pleasestand@live.com>
Wed, 20 Aug 2014 23:44:17 +0000 (19:44 -0400)
commitdd5c1b7fb7ff3983e0fd8f371d5448215efa2201
tree19ad1b5238979c3b51e3dfc3119e2eda0be35ecf
parent4c78b107c352d477f7ac52f7adb3eb4c2ec75024
Title::getContentModel(): load from DB if necessary

Also don't cast $model to int in LinkCache::addGoodLinkObj(); content
model IDs are non-numeric strings, not integers, so that field was
always populated with the value 0. Because 0 is a falsy value, this
caused subsequent calls to Title::getContentModel() to return the
default model rather than the correct one.

Also (hopefully) fixed every single query that could cause a
LinkCache entry to be added without the content model.

Bug: 69789
Change-Id: I94f06baf406afa538cd2b10139598442f9fc6759
RELEASE-NOTES-1.24
includes/OutputPage.php
includes/Title.php
includes/cache/LinkBatch.php
includes/cache/LinkCache.php
includes/parser/LinkHolderArray.php