jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/393267 )
Change subject: Use ParserOutput stateless transforms
......................................................................
Use ParserOutput stateless transforms
Change-Id: I404f064b93573e80b61a228e3cf2b5d2add65c39
Depends-On: I78b62ec33fcb8273acb9b3b4e9012215442be94c
---
M frontend/FlaggablePageView.php
1 file changed, 5 insertions(+), 5 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/frontend/FlaggablePageView.php b/frontend/FlaggablePageView.php
index a602f64..44afbf9 100644
--- a/frontend/FlaggablePageView.php
+++ b/frontend/FlaggablePageView.php
@@ -619,11 +619,10 @@
# Get the new stable parser output...
$pOpts = $this->article->makeParserOptions( $reqUser );
- $pOpts->setEditSection( false ); // old revision
$parserOut = FlaggedRevs::parseStableRevision( $frev, $pOpts );
# Parse and output HTML
- $this->out->addParserOutput( $parserOut );
+ $this->out->addParserOutput( $parserOut, [
'enableSectionEditLinks' => false ] );
return $parserOut;
}
@@ -695,8 +694,9 @@
# Get parsed stable version and output HTML
$pOpts = $this->article->makeParserOptions( $reqUser );
+ $poOpts = [];
if ( !$this->article->getTitle()->quickUserCan( 'edit',
$reqUser ) ) {
- $pOpts->setEditSection( false );
+ $poOpts['enableSectionEditLinks'] = false;
}
$parserCache = FRParserCacheStable::singleton();
$parserOut = $parserCache->get( $this->article, $pOpts );
@@ -705,7 +705,7 @@
# chance that a review form will be added to this page (which
requires the versions).
if ( $parserOut ) {
# Cache hit. Note that redirects are not cached.
- $this->out->addParserOutput( $parserOut );
+ $this->out->addParserOutput( $parserOut, $poOpts );
} else {
$parserOut = false;
# Get the new stable parser output...
@@ -732,7 +732,7 @@
# Update the stable version cache
$parserCache->save( $parserOut, $this->article, $pOpts
);
# Add the stable output to the page view
- $this->out->addParserOutput( $parserOut );
+ $this->out->addParserOutput( $parserOut, $poOpts );
# Update the stable version dependancies
if ( !wfReadOnly() ) {
FlaggedRevs::updateStableOnlyDeps(
--
To view, visit https://gerrit.wikimedia.org/r/393267
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I404f064b93573e80b61a228e3cf2b5d2add65c39
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits