* (bug 6299) Maintain parser's revision ID across recursive calls to fix
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 10 Jul 2006 18:25:56 +0000 (18:25 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 10 Jul 2006 18:25:56 +0000 (18:25 +0000)
  {{REVISIONID}} when Cite extension is used

RELEASE-NOTES
includes/Parser.php

index a7278fb..aa5e64b 100644 (file)
@@ -45,6 +45,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 6618) Improve permissions/error detection in Special:Lockdb
 * Quick hack for extension testing: parser test doesn't create new message
   cache object.
+* (bug 6299) Maintain parser's revision ID across recursive calls to fix
+  {{REVISIONID}} when Cite extension is used
 
 
 == Languages updated ==
index e1efe54..9f60030 100644 (file)
@@ -268,7 +268,10 @@ class Parser
 
                $this->mOptions = $options;
                $this->mTitle =& $title;
-               $this->mRevisionId = $revid;
+               $oldRevisionId = $this->mRevisionId;
+               if( $revid !== null ) {
+                       $this->mRevisionId = $revid;
+               }
                $this->mOutputType = OT_HTML;
 
                //$text = $this->strip( $text, $this->mStripState );
@@ -349,6 +352,7 @@ class Parser
                wfRunHooks( 'ParserAfterTidy', array( &$this, &$text ) );
 
                $this->mOutput->setText( $text );
+               $this->mRevisionId = $oldRevisionId;
                wfProfileOut( $fname );
 
                return $this->mOutput;