From dcfb49111d01de5eff08295f2855ec9ec1c3ad26 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 10 Jul 2006 18:25:56 +0000 Subject: [PATCH] * (bug 6299) Maintain parser's revision ID across recursive calls to fix {{REVISIONID}} when Cite extension is used --- RELEASE-NOTES | 2 ++ includes/Parser.php | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a7278fb30f..aa5e64b84a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/Parser.php b/includes/Parser.php index e1efe54a73..9f60030da2 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -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; -- 2.20.1