summaryrefslogtreecommitdiff
path: root/includes/WikiPage.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/WikiPage.php')
-rw-r--r--includes/WikiPage.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/includes/WikiPage.php b/includes/WikiPage.php
index 7c3dc937..61a05a12 100644
--- a/includes/WikiPage.php
+++ b/includes/WikiPage.php
@@ -48,9 +48,11 @@ class WikiPage implements Page, IDBAccessObject {
public $mDataLoaded = false; // !< Boolean
public $mIsRedirect = false; // !< Boolean
public $mLatest = false; // !< Integer (false means "not loaded")
- public $mPreparedEdit = false; // !< Array
/**@}}*/
+ /** @var stdclass Map of cache fields (text, parser output, ect) for a proposed/new edit */
+ protected $mPreparedEdit = false;
+
/**
* @var int
*/
@@ -242,6 +244,17 @@ class WikiPage implements Page, IDBAccessObject {
$this->mTimestamp = '';
$this->mIsRedirect = false;
$this->mLatest = false;
+ // Bug 57026: do not clear mPreparedEdit since prepareTextForEdit() already checks
+ // the requested rev ID and immutable content against the cached one.
+ // 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;
}