r11339 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11338‎ | r11339 | r11340 >
Date:12:58, 13 October 2005
Author:magnus_manske
Status:old
Tags:
Comment:
ported fix for bug 2257 here
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -99,7 +99,7 @@
100100 var $mTagHooks;
101101
102102 # Cleared with clearState():
103 - var $mOutput, $mAutonumber, $mDTopen, $mStripState = array();
 103+ var $mOutput, $mAutonumber, $mDTopen, $mStripState = array(), $mCurrentParams = array();
104104 var $mVariables, $mIncludeCount, $mArgStack, $mLastSection, $mInPre;
105105 var $mInterwikiLinkHolders, $mLinkHolders;
106106
@@ -141,6 +141,7 @@
142142 $this->mStripState = array();
143143 $this->mArgStack = array();
144144 $this->mInPre = false;
 145+ $this->mCurrentParams = array();
145146 $this->mInterwikiLinkHolders = array(
146147 'texts' => array(),
147148 'titles' => array()
@@ -422,6 +423,7 @@
423424 $text = Parser::extractTagsAndParams( $tag, $text, $ext_content[$tag],
424425 $ext_tags[$tag], $ext_params[$tag], $uniq_prefix );
425426 foreach( $ext_content[$tag] as $marker => $content ) {
 427+ $content = $this->replaceVariables( $content, $this->mCurrentParams );
426428 $full_tag = $ext_tags[$tag][$marker];
427429 $params = $ext_params[$tag][$marker];
428430 if ( $render ) {
@@ -2301,6 +2303,7 @@
23022304 $text = preg_replace( '/<noinclude>.*?<\/noinclude>/s', '', $text );
23032305 $text = strtr( $text, array( '<includeonly>' => '' , '</includeonly>' => '' ) );
23042306 # Strip <nowiki>, <pre>, etc.
 2307+ $this->mCurrentParams = $assocArgs;
23052308 $text = $this->strip( $text, $this->mStripState );
23062309 $text = Sanitizer::removeHTMLtags( $text, array( &$this, 'replaceVariables' ), $assocArgs );
23072310 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r11349Reverting patch for bug 2257 for now:...vibber20:32, 13 October 2005
r55682(bug 2257) Add a $frame parameter to recursiveTagParse so tag extensions can ...nephele06:37, 30 August 2009

Status & tagging log