From: Brion Vibber Date: Mon, 10 Jul 2006 18:25:56 +0000 (+0000) Subject: * (bug 6299) Maintain parser's revision ID across recursive calls to fix X-Git-Tag: 1.31.0-rc.0~56322 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=dcfb49111d01de5eff08295f2855ec9ec1c3ad26;p=lhc%2Fweb%2Fwiklou.git * (bug 6299) Maintain parser's revision ID across recursive calls to fix {{REVISIONID}} when Cite extension is used --- 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;