Aaron Schulz has submitted this change and it was merged. Change subject: Made prepareContentForEdit() use the stash cache by default ......................................................................
Made prepareContentForEdit() use the stash cache by default Change-Id: I1123a8da4764df67f1b0f2b18f6ea74ec5be7be9 --- M includes/api/ApiStashEdit.php M includes/page/WikiPage.php 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index fd5bd7e..2bb0b5c 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -108,8 +108,8 @@ $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 8b26c23..75df27c 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1783,7 +1783,7 @@ $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 @@ * @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; -- To view, visit https://gerrit.wikimedia.org/r/178674 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1123a8da4764df67f1b0f2b18f6ea74ec5be7be9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf11 Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Anomie <bjor...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits