--- Parser.php.orig 2006-02-28 19:28:37.363906791 -0500 +++ Parser.php 2006-02-28 19:28:34.686046016 -0500 @@ -104,7 +104,7 @@ var $mInterwikiLinkHolders, $mLinkHolders; # Temporary: - var $mOptions, $mTitle, $mOutputType, + var $mOptions, $mTitle, $mOutputType, $mTemplateArgs, $mTemplates, // cache of already loaded templates, avoids // multiple SQL queries for the same string $mTemplatePath; // stores an unsorted hash of all the templates already loaded @@ -124,6 +124,7 @@ $this->mTemplates = array(); $this->mTemplatePath = array(); $this->mTagHooks = array(); + $this->mTemplateArgs = array(); $this->clearState(); } @@ -2292,6 +2293,8 @@ $text = preg_replace( '/.*?<\/noinclude>/s', '', $text ); $text = strtr( $text, array( '' => '' , '' => '' ) ); # Strip ,
, etc.
+				# Store a copy of template args so extensions can use them.
+				$this->mTemplateArgs = $assocArgs;
 				$text = $this->strip( $text, $this->mStripState );
 				$text = Sanitizer::removeHTMLtags( $text, array( &$this, 'replaceVariables' ), $assocArgs );
 			}