Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/206121
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/21/206121/1
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: newchange
Gerrit-Change-Id: I4c5ab3ec6829d403a29a8a8f55e7458730369034
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits