Avoid losing cached ParserOutput in doEditContent.
authordaniel <daniel.kinzler@wikimedia.de>
Sun, 8 Jul 2018 19:01:32 +0000 (21:01 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Mon, 9 Jul 2018 13:24:45 +0000 (15:24 +0200)
commit59ea200662b4d1afe166b9c46da50ea851595416
tree976eec8b865eaf805cd531595dadd7ac74f51674
parentea7101e6e469bdba88dad852d055c8371726da8c
Avoid losing cached ParserOutput in doEditContent.

Without this fix, the Content would be parsed twice during an edit,
if extensions that hook into EditFilter and similar
pre-parse hooks call WikiPage::prepareContentForEdit.

With this fix, ParserOutput created by prepareContentForEdit is
re-used by doEditContent.

This is a stop-gap solution. The Real Fix (tm) is to stop using
doEditContent, and use a PageUpdater instead.

Bug: T198483
Change-Id: I42123e48de2b087ef98d8a4855ee3aebd7f1de57
includes/page/WikiPage.php
tests/phpunit/includes/page/WikiPageDbTestBase.php