If a new revision has been inserted (e.g. with updateRevisionOn),
the content model may have changed. This happens with e.g. undeletion.
Bug: T122262
Change-Id: Ia0ed86a9c24809256215418673e9ee8e263d1349
* @return string Content model id
*/
public function getContentModel( $flags = 0 ) {
- if ( !$this->mContentModel && $this->getArticleID( $flags ) ) {
+ if ( ( !$this->mContentModel || $flags === Title::GAID_FOR_UPDATE ) &&
+ $this->getArticleID( $flags )
+ ) {
$linkCache = LinkCache::singleton();
$linkCache->addLinkObj( $this ); # in case we already had an article ID
$this->mContentModel = $linkCache->getGoodLinkFieldObj( $this, 'model' );