Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/179524

Change subject: Avoid globaltitlefail in ApiEditPage
......................................................................

Avoid globaltitlefail in ApiEditPage

The new RequestContext object does not have a title set, so when
setWikiPage() is called, getTitle() reads from $wgTitle. We can
avoid this by setting a title before setting the WikiPage.

Change-Id: I749cc33dd4f1fd6bc7598be34f37e591d822c3f2
---
M includes/api/ApiEditPage.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/24/179524/1

diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php
index f663cc6..1a1064a 100644
--- a/includes/api/ApiEditPage.php
+++ b/includes/api/ApiEditPage.php
@@ -335,6 +335,7 @@
 
                $articleContext = new RequestContext;
                $articleContext->setRequest( $req );
+               $articleContext->setTitle( $titleObj );
                $articleContext->setWikiPage( $pageObj );
                $articleContext->setUser( $this->getUser() );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I749cc33dd4f1fd6bc7598be34f37e591d822c3f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to