During special page transclusion, save and restore context's WikiPage too
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 17 Oct 2018 23:23:27 +0000 (01:23 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 19 Oct 2018 20:19:52 +0000 (22:19 +0200)
commit5f7002b907ac3eec2262fb590a914196fd5a780d
tree76b93e23a2c9f5c8c0b41dccd7e7ec95eddfbb9b
parentc44bba66c96928da76654a0972bdebb5da640878
During special page transclusion, save and restore context's WikiPage too

Setting the Title by calling setTitle clears the WikiPage, and the
next time getWikiPage() is called, it will be lazy-initialized to a
different instance of WikiPage.

This is mostly okay (the behavior has been like this for years and no
one noticed any problems), but it turns out that some extensions
(ConfirmEdit) use custom properties on the WikiPage object to pass
data between different hooks, which are lost when it's re-initialized.

Bug: T207065
Change-Id: I2881895f337bcfb1f86d5fc5a994fa9b0dcc768a
includes/specialpage/SpecialPageFactory.php
tests/phpunit/includes/ExtraParserTest.php