Two somewhat experimental changes before I fix bug 89:
authorWil Mahan <wmahan@users.mediawiki.org>
Tue, 21 Sep 2004 23:56:25 +0000 (23:56 +0000)
committerWil Mahan <wmahan@users.mediawiki.org>
Tue, 21 Sep 2004 23:56:25 +0000 (23:56 +0000)
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.

includes/Parser.php

index 1b91c8f..f30ad68 100644 (file)
@@ -1841,11 +1841,6 @@ class Parser
                                }
                        }
 
-                       # Do not enter included links in link table
-                       if ( !is_null( $title ) ) {
-                               $wgLinkCache->suspend();
-                       }
-
                        # Add a new element to the templace recursion path
                        $this->mTemplatePath[$part1] = 1;
 
@@ -1855,7 +1850,6 @@ class Parser
 
                        # Resume the link cache and register the inclusion as a link
                        if ( !is_null( $title ) ) {
-                               $wgLinkCache->resume();
                                $wgLinkCache->addLinkObj( $title );
                        }
                }
@@ -1905,9 +1899,7 @@ class Parser
                $inputArgs = end( $this->mArgStack );
 
                if ( array_key_exists( $arg, $inputArgs ) ) {
-                       $text = $this->strip( $inputArgs[$arg], $this->mStripState );
-                       $text = $this->removeHTMLtags( $text );
-                       $text = $this->replaceVariables( $text, array() );
+                       $text = $inputArgs[$arg];
                }
 
                return $text;