r5370 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5369‎ | r5370 | r5371 >
Date:23:56, 21 September 2004
Author:wmahan
Status:old
Tags:
Comment:
Two somewhat experimental changes before I fix bug 89:
1) Don't suspend the LinkCache when including templates;
because we don't call replaceInternalLinks() anymore,
it doesn't do anything.
2) Don't call strip(), removeHTMLcomments(), or replaceVariables()
on template parameters in argSubstitution(). The first two
should already be done on the article including the template,
and the third is unnecessary because it isn't possible to
pass templates as parameters to templates.

These seem to work, but if anybody notices any problems,
please let me know.
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -1841,11 +1841,6 @@
18421842 }
18431843 }
18441844
1845 - # Do not enter included links in link table
1846 - if ( !is_null( $title ) ) {
1847 - $wgLinkCache->suspend();
1848 - }
1849 -
18501845 # Add a new element to the templace recursion path
18511846 $this->mTemplatePath[$part1] = 1;
18521847
@@ -1855,7 +1850,6 @@
18561851
18571852 # Resume the link cache and register the inclusion as a link
18581853 if ( !is_null( $title ) ) {
1859 - $wgLinkCache->resume();
18601854 $wgLinkCache->addLinkObj( $title );
18611855 }
18621856 }
@@ -1905,9 +1899,7 @@
19061900 $inputArgs = end( $this->mArgStack );
19071901
19081902 if ( array_key_exists( $arg, $inputArgs ) ) {
1909 - $text = $this->strip( $inputArgs[$arg], $this->mStripState );
1910 - $text = $this->removeHTMLtags( $text );
1911 - $text = $this->replaceVariables( $text, array() );
 1903+ $text = $inputArgs[$arg];
19121904 }
19131905
19141906 return $text;

Follow-up revisions

RevisionCommit summaryAuthorDate
r5371Now it is straightforward to fix bug 89, subst: template parameters....wmahan00:15, 22 September 2004

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r5343Completely remove variableSubstitution(), because magic variable...wmahan05:12, 21 September 2004

Status & tagging log