jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/393275 )
Change subject: Use ParserOutput stateless transforms
......................................................................
Use ParserOutput stateless transforms
Change-Id: Id6ad08a0b1f8575e7ee98916217a84c09e72dd3b
Depends-On: I78b62ec33fcb8273acb9b3b4e9012215442be94c
---
M TemplateSandbox.hooks.php
1 file changed, 3 insertions(+), 4 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/TemplateSandbox.hooks.php b/TemplateSandbox.hooks.php
index b0cb4fb..0c520e6 100644
--- a/TemplateSandbox.hooks.php
+++ b/TemplateSandbox.hooks.php
@@ -119,7 +119,6 @@
$popts = $editpage->getArticle()->makeParserOptions(
$context
);
- $popts->setEditSection( false );
$popts->setIsPreview( true );
$popts->setIsSectionPreview( false );
$content = $content->preSaveTransform(
@@ -132,7 +131,6 @@
$page = WikiPage::factory( $title );
$popts = $page->makeParserOptions( $context );
- $popts->setEditSection( false );
$popts->setIsPreview( true );
$popts->setIsSectionPreview( false );
$logic = new TemplateSandboxLogic( [], $templatetitle,
$content );
@@ -147,7 +145,9 @@
$dtitle = $parserOutput->getDisplayTitle();
$parserOutput->setTitleText( '' );
- $out = $parserOutput->getText();
+ $out = $parserOutput->getText( [
+ 'enableSectionEditLinks' => false,
+ ] );
if ( count( $parserOutput->getWarnings() ) ) {
$note .= "\n\n" . implode( "\n\n",
$parserOutput->getWarnings() );
@@ -427,7 +427,6 @@
// Apply PST to templatesandboxtext
$popts = $page->makeParserOptions( $module );
- $popts->setEditSection( false );
$popts->setIsPreview( true );
$popts->setIsSectionPreview( false );
$user = RequestContext::getMain()->getUser();
--
To view, visit https://gerrit.wikimedia.org/r/393275
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id6ad08a0b1f8575e7ee98916217a84c09e72dd3b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
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