--- Parser.php 2004-07-14 22:49:57.000000000 +0200 +++ Parser.php.new 2004-07-14 22:49:33.000000000 +0200 @@ -56,10 +56,11 @@ var $mVariables, $mIncludeCount, $mArgStack, $mLastSection, $mInPre; # Temporary: - var $mOptions, $mTitle, $mOutputType; + var $mOptions, $mTitle, $mOutputType, $mTemplates; function Parser() { $this->mTagHooks = array(); + $this->mTemplates = array(); $this->clearState(); } @@ -1621,6 +1622,18 @@ $found = true; } */ + + # Tmp template table test + for($i=0; $imTemplates); $i++) { + if (!count(array_diff($this->mTemplates[$i][0], $matches)) && + !count(array_diff($matches, $this->mTemplates[$i][0])) + ) { + $text = $this->mTemplates[$i][1]; + $found = true; + break; + } + } + # Load from database if ( !$found ) { $title = Title::newFromText( $part1, NS_TEMPLATE ); @@ -1642,6 +1655,9 @@ $text = '[[' . $title->getPrefixedText() . ']]'; $found = true; } + + # Tmp array insertion + array_push($this->mTemplates, array($matches, $text)); } }