From 8842bc95fc06c8114e50574cdae33ac8fbf5d6a0 Mon Sep 17 00:00:00 2001 From: aude Date: Sun, 17 Nov 2013 10:32:15 +0100 Subject: [PATCH] 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 --- includes/WikiPage.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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. -- 2.20.1