jenkins-bot has submitted this change and it was merged.

Change subject: ApiEditPage: Fetch content model from article, not title
......................................................................


ApiEditPage: Fetch content model from article, not title

The Title object's cached content model isn't updated after the edit.
The Article object fetches the model from the revision that was just
created, so let's just use that instead.

Bug: T96937
Change-Id: I4c5ab3ec6829d403a29a8a8f55e7458730369034
---
M includes/api/ApiEditPage.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mattflaschen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php
index 0dee147..6ab8483 100644
--- a/includes/api/ApiEditPage.php
+++ b/includes/api/ApiEditPage.php
@@ -497,7 +497,7 @@
                                $r['result'] = 'Success';
                                $r['pageid'] = intval( 
$titleObj->getArticleID() );
                                $r['title'] = $titleObj->getPrefixedText();
-                               $r['contentmodel'] = 
$titleObj->getContentModel();
+                               $r['contentmodel'] = 
$articleObject->getContentModel();
                                $newRevId = $articleObject->getLatest();
                                if ( $newRevId == $oldRevId ) {
                                        $r['nochange'] = true;

-- 
To view, visit https://gerrit.wikimedia.org/r/206121
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c5ab3ec6829d403a29a8a8f55e7458730369034
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Mattflaschen <mflasc...@wikimedia.org>
Gerrit-Reviewer: Tpt <thoma...@hotmail.fr>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to