From de6393d19099df4c5c120784c304738fb5885944 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 9 Dec 2014 14:23:11 -0800 Subject: [PATCH] Made prepareContentForEdit() use the stash cache by default Change-Id: I1123a8da4764df67f1b0f2b18f6ea74ec5be7be9 --- includes/api/ApiStashEdit.php | 4 ++-- includes/page/WikiPage.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index fd5bd7e9f2..2bb0b5c1ca 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -108,8 +108,8 @@ class ApiStashEdit extends ApiBase { $editInfo = false; $status = 'ratelimited'; } elseif ( $wgMemc->lock( $key, 0, 30 ) ) { - $contentFormat = $content->getDefaultFormat(); - $editInfo = $page->prepareContentForEdit( $content, null, $user, $contentFormat ); + $format = $content->getDefaultFormat(); + $editInfo = $page->prepareContentForEdit( $content, null, $user, $format, false ); $status = 'error'; // default $unlocker = new ScopedCallback( function() use ( $key ) { global $wgMemc; diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 8b26c2319c..75df27c84d 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1783,7 +1783,7 @@ class WikiPage implements Page, IDBAccessObject { $summary = $handler->getAutosummary( $old_content, $content, $flags ); } - $editInfo = $this->prepareContentForEdit( $content, null, $user, $serialFormat, true ); + $editInfo = $this->prepareContentForEdit( $content, null, $user, $serialFormat ); $serialized = $editInfo->pst; /** @@ -2076,7 +2076,7 @@ class WikiPage implements Page, IDBAccessObject { * @since 1.21 */ public function prepareContentForEdit( - Content $content, $revid = null, User $user = null, $serialFormat = null, $useCache = false + Content $content, $revid = null, User $user = null, $serialFormat = null, $useCache = true ) { global $wgContLang, $wgUser; -- 2.20.1