jenkins-bot has submitted this change and it was merged.

Change subject: Use ParserOutput::getRawText() where available
......................................................................


Use ParserOutput::getRawText() where available

This is unlikely to be a cause of the cache corruption since the special
page's ParserOutput shouldn't be being cached anyway, but let's fix it
just in case.

Bug: T124356
Change-Id: I06ade4504024a7f1fe3627f2f887d5dadf7a5775
---
M SpecialTemplateSandbox.php
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SpecialTemplateSandbox.php b/SpecialTemplateSandbox.php
index 83953e6..38ba483 100644
--- a/SpecialTemplateSandbox.php
+++ b/SpecialTemplateSandbox.php
@@ -126,7 +126,11 @@
                        $pageLang = $this->title->getPageLanguage();
                        $attribs = array( 'lang' => $pageLang->getCode(), 'dir' 
=> $pageLang->getDir(),
                                'class' => 'mw-content-' . $pageLang->getDir() 
);
-                       $this->output->setText( Html::rawElement( 'div', 
$attribs, $this->output->getText() ) );
+                       $this->output->setText( Html::rawElement( 'div', 
$attribs,
+                               is_callable( array( $this->output, 'getRawText' 
) )
+                                       ? $this->output->getRawText()
+                                       : $this->output->getText()
+                       ) );
 
                        $output = $this->getOutput();
                        $output->addParserOutput( $this->output );

-- 
To view, visit https://gerrit.wikimedia.org/r/266261
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I06ade4504024a7f1fe3627f2f887d5dadf7a5775
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: 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

Reply via email to