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
This commit is contained in:
parent
b40158b77b
commit
480e8cceb1
1 changed files with 1 additions and 1 deletions
|
|
@ -497,7 +497,7 @@ class ApiEditPage extends ApiBase {
|
|||
$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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue