From 10728de893902b9a634a33d468b0f76b6fd240f6 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 14 Jan 2007 17:37:29 +0000 Subject: [PATCH] Fixed diff-related regression, tidy accidentally disabled --- includes/DifferenceEngine.php | 2 +- includes/OutputPage.php | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index 605232352e..b4806fcaa5 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -213,7 +213,7 @@ CONTROL; $wgOut->setRevisionId( $this->mNewRev->getId() ); } - $wgOut->addSecondaryWikiText( $this->mNewtext ); + $wgOut->addWikiTextTidy( $this->mNewtext ); if( !$this->mNewRev->isCurrent() ) { $wgOut->parserOptions()->setEditSection( $oldEditSectionSetting ); diff --git a/includes/OutputPage.php b/includes/OutputPage.php index e6b872c4c0..250e631ff8 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -316,7 +316,7 @@ class OutputPage { } function addWikiTextTitleTidy($text, &$title, $linestart = true) { - addWikiTextTitle( $text, $title, $linestart, true ); + $this->addWikiTextTitle( $text, $title, $linestart, true ); } public function addWikiTextTitle($text, &$title, $linestart, $tidy = false) { @@ -397,17 +397,19 @@ class OutputPage { } /** - * For anything that isn't primary text or interface message - * - * @param string $text - * @param bool $linestart Is this the start of a line? + * @deprecated use addWikiTextTidy() */ public function addSecondaryWikiText( $text, $linestart = true ) { global $wgTitle; - $popts = $this->parserOptions(); - $popts->setTidy(true); - $this->addWikiTextTitle($text, $wgTitle, $linestart); - $popts->setTidy(false); + $this->addWikiTextTitleTidy($text, $wgTitle, $linestart); + } + + /** + * Add wikitext with tidy enabled + */ + public function addWikiTextTidy( $text, $linestart = true ) { + global $wgTitle; + $this->addWikiTextTitleTidy($text, $wgTitle, $linestart); } -- 2.20.1