* (bug 7026) Fix action=raw&templates=expand
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 31 Aug 2006 16:48:37 +0000 (16:48 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 31 Aug 2006 16:48:37 +0000 (16:48 +0000)
http://bugzilla.wikimedia.org/attachment.cgi?id=2229&action=view

RELEASE-NOTES
includes/RawPage.php

index d1b4810..43ee71a 100644 (file)
@@ -172,6 +172,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * [[Special:Disambiguations]] now shows pages in NS:0 that link to any pages that embed
   any of the templates listed at [[MediaWiki:Disambiguationspage]].
 * Fix formatting of titles on Special:Undelete
+* (bug 7026) Fix action=raw&templates=expand
+
 
 == Languages updated ==
 
index f72c660..f5e74e7 100644 (file)
@@ -189,14 +189,8 @@ class RawPage {
                        return '';
                else
                        if ( $this->mExpandTemplates ) {
-                               global $wgTitle;
-
-                               $parser = new Parser();
-                               $parser->Options( new ParserOptions() ); // We don't want this to be user-specific
-                               $parser->Title( $wgTitle );
-                               $parser->OutputType( OT_HTML );
-
-                               return $parser->replaceVariables( $text );
+                               global $wgParser;
+                               return $wgParser->preprocess( $text, $this->mTitle, new ParserOptions() );
                        } else
                                return $text;
        }