Fixed diff-related regression, tidy accidentally disabled
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 14 Jan 2007 17:37:29 +0000 (17:37 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 14 Jan 2007 17:37:29 +0000 (17:37 +0000)
includes/DifferenceEngine.php
includes/OutputPage.php

index 6052323..b4806fc 100644 (file)
@@ -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 );
index e6b872c..250e631 100644 (file)
@@ -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);
        }