r5255 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5254‎ | r5255 | r5256 >
Date:06:15, 17 September 2004
Author:jeluf
Status:old
Tags:
Comment:
BUG#60 Patch by Wil Mahan
Include templates instead of parsing them. Than, parse the whole wikitext
in one step
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -570,14 +570,6 @@
571571 return $t ;
572572 }
573573
574 - # Parses the text and adds the result to the strip state
575 - # Returns the strip tag
576 - function stripParse( $text, $newline, $args ) {
577 - $text = $this->strip( $text, $this->mStripState );
578 - $text = $this->internalParse( $text, (bool)$newline, $args, false );
579 - return $newline.$this->insertStripItem( $text, $this->mStripState );
580 - }
581 -
582574 function internalParse( $text, $linestart, $args = array(), $isMain=true ) {
583575 global $wgLang;
584576
@@ -1705,7 +1697,8 @@
17061698 # Add a new element to the templace recursion path
17071699 $this->mTemplatePath[$part1] = 1;
17081700
1709 - $text = $this->stripParse( $text, $newline, $assocArgs );
 1701+ $text = $this->removeHTMLtags( $text );
 1702+ $text = $this->replaceVariables( $text, $assocArgs );
17101703
17111704 # Resume the link cache and register the inclusion as a link
17121705 if ( !is_null( $title ) ) {
@@ -1732,7 +1725,8 @@
17331726 $inputArgs = end( $this->mArgStack );
17341727
17351728 if ( array_key_exists( $arg, $inputArgs ) ) {
1736 - $text = $this->stripParse( $inputArgs[$arg], $newline, array() );
 1729+ $text = $this->removeHTMLtags( $inputArgs[$arg] );
 1730+ $text = $this->replaceVariables( $text, array() );
17371731 }
17381732
17391733 return $text;

Follow-up revisions

RevisionCommit summaryAuthorDate
r5294BUG#16 BUG#60 BUG#70 BUG#80 BUG#283 BUG#161 BUG#131 BUG#302...jeluf21:10, 18 September 2004

Status & tagging log