From: aude Date: Sun, 17 Nov 2013 09:32:15 +0000 (+0100) Subject: Add function to clear mPreparedEdit, to use in cases of mutable content X-Git-Tag: 1.31.0-rc.0~18079^2 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=8842bc95fc06c8114e50574cdae33ac8fbf5d6a0;p=lhc%2Fweb%2Fwiklou.git Add function to clear mPreparedEdit, to use in cases of mutable content In Wikibase, EntityContent is mutable and needs to clear prepared edit before performing a save. Follow-up to I2c34baa Change-Id: I770bf2dc960c0a67a9b8315b7cdf24f3b89b6480 --- diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 5fc01cc82f..d3743b5044 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -249,6 +249,15 @@ class WikiPage implements Page, IDBAccessObject { // Clearing it can cause extra parses on edit for no reason. } + /** + * Clear the mPreparedEdit cache field, as may be needed by mutable content types + * @return void + * @since 1.23 + */ + public function clearPreparedEdit() { + $this->mPreparedEdit = false; + } + /** * Return the list of revision fields that should be selected to create * a new page.