Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/289221
Change subject: Title->getContentModel: Get new content model with GAID_FOR_UPDATE ...................................................................... Title->getContentModel: Get new content model with GAID_FOR_UPDATE 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 --- M includes/Title.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/289221/1 diff --git a/includes/Title.php b/includes/Title.php index 25fbce3..ce5466a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -908,7 +908,7 @@ * @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' ); -- To view, visit https://gerrit.wikimedia.org/r/289221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0ed86a9c24809256215418673e9ee8e263d1349 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits