* Remove some dud code
authorRob Church <robchurch@users.mediawiki.org>
Thu, 4 May 2006 22:04:17 +0000 (22:04 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Thu, 4 May 2006 22:04:17 +0000 (22:04 +0000)
* Disallow substituting Special pages when included into a page (was puking up a UNIQ_XXXXXXXXX type string)

RELEASE-NOTES
includes/Parser.php

index 10bfeb3..d5cd4f7 100644 (file)
@@ -198,6 +198,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   page doesn't exist
 * Special:Randompage now additionally accepts English namespace name as parameter
 * (bug 2981) Really fixed linktrail for Tamil (ta)
+* Disallow substituting Special pages when included into a page
 
 == Compatibility ==
 
index b4eeb0d..958c1bf 100644 (file)
@@ -2682,20 +2682,6 @@ class Parser
                                }
                        }
                }
-               
-                       /*$mwNumUsers =& MagicWord::get( MAG_NUMBEROFUSERS );
-                       if( $mwNumUsers->matchStartAndRemove( $part1 ) ) {
-                               $mwRawSuffix =& MagicWord::get( MAG_RAWSUFFIX );
-                               if( $mwRawSuffix->match( $args[0] ) ) {
-                                       # Raw and unformatted
-                                       $text = $linestart . wfNumberOfUsers();
-                               } else {
-                                       # Default; formatted form
-                                       $text = $linestart . $wgContLang->formatNum( wfNumberOfUsers() );
-                               }
-                               $found = true;
-                       }
-               }*/
 
                # Extensions
                if ( !$found && substr( $part1, 0, 1 ) == '#' ) {
@@ -2767,8 +2753,7 @@ class Parser
                                        # Check for excessive inclusion
                                        $dbk = $title->getPrefixedDBkey();
                                        if ( $this->incrementIncludeCount( $dbk ) ) {
-                                               if ( $title->getNamespace() == NS_SPECIAL && $this->mOptions->getAllowSpecialInclusion() ) {
-                                                       # Capture special page output
+                                               if ( $title->getNamespace() == NS_SPECIAL && $this->mOptions->getAllowSpecialInclusion() && $this->mOutputType != OT_WIKI ) {
                                                        $text = SpecialPage::capturePath( $title );
                                                        if ( is_string( $text ) ) {
                                                                $found = true;