(bug 45092) Better context for Article initialized by ApiEditPage
authorLiangent <liangent@gmail.com>
Sun, 17 Feb 2013 10:59:41 +0000 (18:59 +0800)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 19 Feb 2013 08:56:40 +0000 (08:56 +0000)
commit078334ff4959b856cc84782f3cead1509bcd540e
treed580ae1536d2f0f37fa6db3d1775297e6c91645e
parentf288ae3290750b8718d15bb535a8403dfbe9559a
(bug 45092) Better context for Article initialized by ApiEditPage

After I99a19c93, the $context argument of EditFilterMergedContent hook
is just $editPage->mArticle->getContext() which has a title of [[API]]
when it's created in ApiEditPage called internally (like what WikiLove
does). Now a new context is created for it which simulates a real edit
(title is the title being edited, and request is the derivated one with
a few more fake parameters added).

Change-Id: I743942822eb5097d9d98c11088a91395d9e6d47f
includes/api/ApiEditPage.php